pacman-key 0.4.1

Native Rust interface for managing the pacman keyring on Arch Linux
Documentation
//! Native Rust bindings for managing the pacman keyring on Arch Linux.
//!
//! This crate provides a structured API for interacting with `pacman-key`,
//! parsing GPG output to return Rust types.
//!
//! # Example
//!
//! ```no_run
//! use pacman_key::Keyring;
//!
//! #[tokio::main]
//! async fn main() -> pacman_key::Result<()> {
//!     let keyring = Keyring::new();
//!
//!     let keys = keyring.list_keys().await?;
//!     for key in keys {
//!         println!("{}: {}", &key.fingerprint[..16], key.uid);
//!     }
//!
//!     Ok(())
//! }
//! ```
//!
//! # Subprocesses
//!
//! Each operation runs its subprocesses in a new process group, which is
//! killed with SIGKILL on timeout, on cancellation, when the operation's
//! future is dropped, or when the calling process terminates. Terminal signals
//! such as Ctrl-C do not reach that group directly. A killed gpg can leave
//! stale lock files in the keyring directory; they do not block later runs.
//!
//! # Requirements
//!
//! - Arch Linux with `pacman-key` available
//! - Root access for write operations (init, populate, sign, delete)
//! - Read access to `/etc/pacman.d/gnupg` for list operations

mod error;
mod keyring;
mod parse;
mod process;
mod types;
mod validation;

pub use error::{Error, Result};
pub use keyring::{Keyring, ReadOnlyKeyring};
pub use types::{
    CancellationToken, InitializationStatus, Key, KeyType, KeyUsage, KeyValidity, OperationOptions,
    OwnerTrust, RefreshProgress, SigStatus, Signature, Subkey, VerifyResult,
};