RecipientPluginV1

Struct RecipientPluginV1 

Source
pub struct RecipientPluginV1<C: Callbacks> { /* private fields */ }
Available on crate feature plugin only.
Expand description

An age plugin with an associated set of recipients.

This struct implements Recipient, enabling the plugin to encrypt a file to the entire set of recipients.

Implementations§

Source§

impl<C: Callbacks> RecipientPluginV1<C>

Source

pub fn new( plugin_name: &str, recipients: &[Recipient], identities: &[Identity], callbacks: C, ) -> Result<Self, EncryptError>

Creates an age plugin from a plugin name and lists of recipients and identities.

The lists of recipients and identities will be filtered by the plugin name; recipients 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> Recipient for RecipientPluginV1<C>

Source§

fn wrap_file_key( &self, file_key: &FileKey, ) -> Result<(Vec<Stanza>, HashSet<String>), EncryptError>

Wraps the given file key, returning stanzas to be placed in an age file header, and labels that constrain how the stanzas may be combined with those from other recipients. Read more

Auto Trait Implementations§

§

impl<C> Freeze for RecipientPluginV1<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for RecipientPluginV1<C>
where C: RefUnwindSafe,

§

impl<C> Send for RecipientPluginV1<C>

§

impl<C> Sync for RecipientPluginV1<C>

§

impl<C> Unpin for RecipientPluginV1<C>
where C: Unpin,

§

impl<C> UnwindSafe for RecipientPluginV1<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V