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§

source§

impl<C: Callbacks> IdentityPluginV1<C>

source

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§

source§

impl<C: Callbacks> Identity for IdentityPluginV1<C>

source§

fn unwrap_stanza( &self, stanza: &Stanza ) -> Option<Result<FileKey, DecryptError>>

Attempts to unwrap the given stanza with this identity. Read more
source§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V