pub struct SecretBundleState { /* private fields */ }
Implementations§
Source§impl SecretBundleState
impl SecretBundleState
Sourcepub fn latest(&self) -> Option<&GroupSecret>
pub fn latest(&self) -> Option<&GroupSecret>
Returns the latest known secret which should preferably used for encrypting new data.
Sourcepub fn get(&self, id: &GroupSecretId) -> Option<&GroupSecret>
pub fn get(&self, id: &GroupSecretId) -> Option<&GroupSecret>
Returns a secret based on the id.
This can be used to retrieve a secret to decrypt data where we know which secret id has been used.
Sourcepub fn contains(&self, id: &GroupSecretId) -> bool
pub fn contains(&self, id: &GroupSecretId) -> bool
Returns true when the bundle contains a secret with the given id.
Sourcepub fn iter(&self) -> Iter<'_, GroupSecretId, GroupSecret>
pub fn iter(&self) -> Iter<'_, GroupSecretId, GroupSecret>
Iterator over secrets (values) and their ids (keys).
Sourcepub fn ids(&self) -> Keys<'_, GroupSecretId, GroupSecret>
pub fn ids(&self) -> Keys<'_, GroupSecretId, GroupSecret>
Iterator over all ids.
Sourcepub fn secrets(&self) -> Values<'_, GroupSecretId, GroupSecret>
pub fn secrets(&self) -> Values<'_, GroupSecretId, GroupSecret>
Iterator over all secrets.
Trait Implementations§
Source§impl Clone for SecretBundleState
impl Clone for SecretBundleState
Source§fn clone(&self) -> SecretBundleState
fn clone(&self) -> SecretBundleState
Returns a duplicate of the value. Read more
1.0.0 · 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 SecretBundleState
impl Debug for SecretBundleState
Source§impl<'de> Deserialize<'de> for SecretBundleState
impl<'de> Deserialize<'de> for SecretBundleState
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoIterator for SecretBundleState
impl IntoIterator for SecretBundleState
Source§impl PartialEq for SecretBundleState
impl PartialEq for SecretBundleState
Source§impl Serialize for SecretBundleState
impl Serialize for SecretBundleState
impl Eq for SecretBundleState
impl StructuralPartialEq for SecretBundleState
Auto Trait Implementations§
impl Freeze for SecretBundleState
impl RefUnwindSafe for SecretBundleState
impl Send for SecretBundleState
impl Sync for SecretBundleState
impl Unpin for SecretBundleState
impl UnwindSafe for SecretBundleState
Blanket Implementations§
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