Struct age::plugin::IdentityPluginV1
source · [−]pub struct IdentityPluginV1<C: Callbacks> { /* private fields */ }
Available on crate feature
plugin
only.Expand description
An age plugin with an associated set of identities.
This struct implements Identity
, enabling the plugin to decrypt a file with any
identity in the set of identities.
Implementations
sourceimpl<C: Callbacks> IdentityPluginV1<C>
impl<C: Callbacks> IdentityPluginV1<C>
sourcepub fn new(
plugin_name: &str,
identities: &[Identity],
callbacks: C
) -> Result<Self, DecryptError>
pub fn new(
plugin_name: &str,
identities: &[Identity],
callbacks: C
) -> Result<Self, DecryptError>
Creates an age plugin from a plugin name and a list of identities.
The list of identities will be filtered by the plugin name; identities that don’t match will be ignored.
Returns an error if the plugin’s binary cannot be found in $PATH
.
Trait Implementations
sourceimpl<C: Callbacks> Identity for IdentityPluginV1<C>
impl<C: Callbacks> Identity for IdentityPluginV1<C>
sourcefn unwrap_stanza(
&self,
stanza: &Stanza
) -> Option<Result<FileKey, DecryptError>>
fn unwrap_stanza(
&self,
stanza: &Stanza
) -> Option<Result<FileKey, DecryptError>>
Attempts to unwrap the given stanza with this identity. Read more
sourcefn unwrap_stanzas(
&self,
stanzas: &[Stanza]
) -> Option<Result<FileKey, DecryptError>>
fn unwrap_stanzas(
&self,
stanzas: &[Stanza]
) -> Option<Result<FileKey, DecryptError>>
Attempts to unwrap any of the given stanzas, which are assumed to come from the same age file header, and therefore contain the same file key. Read more
Auto Trait Implementations
impl<C> RefUnwindSafe for IdentityPluginV1<C> where
C: RefUnwindSafe,
impl<C> Send for IdentityPluginV1<C>
impl<C> Sync for IdentityPluginV1<C>
impl<C> Unpin for IdentityPluginV1<C> where
C: Unpin,
impl<C> UnwindSafe for IdentityPluginV1<C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more