Struct age::plugin::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
sourceimpl<C: Callbacks> RecipientPluginV1<C>
impl<C: Callbacks> RecipientPluginV1<C>
sourcepub fn new(
plugin_name: &str,
recipients: &[Recipient],
identities: &[Identity],
callbacks: C
) -> Result<Self, EncryptError>
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
sourceimpl<C: Callbacks> Recipient for RecipientPluginV1<C>
impl<C: Callbacks> Recipient for RecipientPluginV1<C>
sourcefn wrap_file_key(&self, file_key: &FileKey) -> Result<Vec<Stanza>, EncryptError>
fn wrap_file_key(&self, file_key: &FileKey) -> Result<Vec<Stanza>, EncryptError>
Wraps the given file key, returning stanzas to be placed in an age file header. Read more
Auto Trait Implementations
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
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