Skip to main content

aur_vote_state

Function aur_vote_state 

Source
pub fn aur_vote_state(
    pkgbase: &str,
    ctx: &AurVoteContext,
) -> Result<AurPackageVoteState, AurVoteError>
Expand description

What: Check whether the current AUR account has voted for a package base.

Inputs:

  • pkgbase: Target AUR package base name.
  • ctx: SSH execution context (timeout and SSH command).

Output:

  • Ok(AurPackageVoteState) on successful state retrieval.
  • Err(AurVoteError) for SSH/auth/network/maintenance and unexpected failures.

Details:

  • Uses ssh aur@aur.archlinux.org list-votes and checks membership client-side.
  • This is read-only and does not mutate vote state.

ยงErrors

Returns AurVoteError when SSH command execution fails, authentication is invalid, network connectivity fails, AUR is in maintenance mode, the caller IP is blocked, or upstream output cannot be mapped.