pub struct SecretUpdate {
pub name: String,
pub ciphertext: Option<Vec<u8>>,
pub recipient: Option<String>,
}Expand description
One secret update inside a push.
Fields§
§name: String§ciphertext: Option<Vec<u8>>Opaque, already-encrypted bytes. None revokes the secret.
recipient: Option<String>Free-form label for the key/recipient that can open it (e.g. an age recipient). Never the key itself.
Implementations§
Source§impl SecretUpdate
impl SecretUpdate
Sourcepub fn new(name: impl Into<String>, ciphertext: Vec<u8>) -> Result<Self>
pub fn new(name: impl Into<String>, ciphertext: Vec<u8>) -> Result<Self>
Store ciphertext under name.
Errors on empty ciphertext: an empty blob is what a caller that forgot to encrypt produces, and a row that claims to hold a secret but holds nothing is worse than a refusal.
pub fn revoke(name: impl Into<String>) -> Self
pub fn for_recipient(self, recipient: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for SecretUpdate
impl Clone for SecretUpdate
Source§fn clone(&self) -> SecretUpdate
fn clone(&self) -> SecretUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecretUpdate
impl Debug for SecretUpdate
impl Eq for SecretUpdate
Source§impl PartialEq for SecretUpdate
impl PartialEq for SecretUpdate
impl StructuralPartialEq for SecretUpdate
Auto Trait Implementations§
impl Freeze for SecretUpdate
impl RefUnwindSafe for SecretUpdate
impl Send for SecretUpdate
impl Sync for SecretUpdate
impl Unpin for SecretUpdate
impl UnsafeUnpin for SecretUpdate
impl UnwindSafe for SecretUpdate
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.