Skip to content

Commit

Permalink
Update docs to permit multiple stanzas from recipients
Browse files Browse the repository at this point in the history
Closes #524.
  • Loading branch information
str4d committed Nov 3, 2024
1 parent d0889c9 commit bca6916
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions age-plugin/src/recipient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ pub trait RecipientPluginV1 {
/// Wraps each `file_key` to all recipients and identities previously added via
/// `add_recipient` and `add_identity`.
///
/// Returns either one stanza per recipient and identity for each file key, or any
/// errors if one or more recipients or identities could not be wrapped to.
/// Returns a set of stanzas per file key that wrap it to each recipient and identity.
/// Plugins 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.
///
/// If one or more recipients or identities could not be wrapped to, no stanzas are
/// returned for any of the file keys.
///
/// `callbacks` can be used to interact with the user, to have them take some physical
/// action or request a secret value.
Expand Down
3 changes: 2 additions & 1 deletion age/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ pub trait Recipient {
/// and labels that constrain how the stanzas may be combined with those from other
/// recipients.
///
/// Implementations MUST NOT return more than one stanza per "actual recipient".
/// 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
Expand Down

0 comments on commit bca6916

Please sign in to comment.