pub struct Keyring {
pub keys: BTreeMap<Fingerprint, SigningKey>,
pub identifiers: BTreeMap<String, Subkey>,
}Fields§
§keys: BTreeMap<Fingerprint, SigningKey>§identifiers: BTreeMap<String, Subkey>Implementations§
Source§impl Keyring
impl Keyring
pub fn load(config: &Config) -> Result<Self>
pub fn new(keyring: &[u8]) -> Result<Self>
pub fn add_keyring(&mut self, keyring: &[u8]) -> Result<()>
pub fn register_identifiers(&mut self, key: &SigningKey)
pub fn all_fingerprints(&self) -> Vec<Fingerprint>
pub fn find_signing_key( &self, sig: &Signature, ) -> Result<(&Fingerprint, &SigningKey)>
pub fn verify(&self, data: &[u8], sig: &Signature) -> Result<Fingerprint>
pub fn generate_report(&self) -> Result<KeyringReport>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keyring
impl RefUnwindSafe for Keyring
impl Send for Keyring
impl Sync for Keyring
impl Unpin for Keyring
impl UnwindSafe for Keyring
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more