INNER CODE UNIT · Rust
unwrap_stanzas
str4d/rage · age/src/lib.rs:323
fn unwrap_stanzas(&self, stanzas: &[Stanza]) -> Option<Result<FileKey, DecryptError>> {
stanzas.iter().find_map(|stanza| self.unwrap_stanza(stanza))
}
}
/// A public key or other value that can wrap an opaque file key to a recipient stanza.
///
/// Implementations of this trait might represent more than one recipient.
pub trait Recipient {
/// 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.
///
/// Implementations may return more than one stanza per "actual recipient", e.g. to
/// support multiple formats, to build group aliases, or to act as a proxy.
///
/// This method is part of the `Recipient` trait to expose age's [one joint] for
/// external implementations. You should not need to call this directly; instead, pass