pub struct OneTimeKeys { /* private fields */ }Expand description
Struct representing the the one-time keys. The keys can be accessed in a map-like fashion.
Implementations§
Source§impl OneTimeKeys
impl OneTimeKeys
Sourcepub fn curve25519(&self) -> &HashMap<String, String>
pub fn curve25519(&self) -> &HashMap<String, String>
Get the HashMap containing the curve25519 one-time keys.
This is the same as using get("curve25519").unwrap()
Sourcepub fn get(&self, key_type: &str) -> Option<&HashMap<String, String>>
pub fn get(&self, key_type: &str) -> Option<&HashMap<String, String>>
Get a reference to the hashmap corresponding to given key type.
Sourcepub fn values(&self) -> Values<'_, String, HashMap<String, String>>
pub fn values(&self) -> Values<'_, String, HashMap<String, String>>
An iterator visiting all one-time key hashmaps in an arbitrary order.
Sourcepub fn keys(&self) -> Keys<'_, String, HashMap<String, String>>
pub fn keys(&self) -> Keys<'_, String, HashMap<String, String>>
An iterator visiting all one-time key types in an arbitrary order.
Sourcepub fn iter(&self) -> Iter<'_, String, HashMap<String, String>>
pub fn iter(&self) -> Iter<'_, String, HashMap<String, String>>
An iterator visiting all one-time key types and their respective key hashmaps in an arbitrary order.
Sourcepub fn contains_key(&self, key_type: &str) -> bool
pub fn contains_key(&self, key_type: &str) -> bool
Returns true if the struct contains the given key type.
This does not mean that there are any keys for the given key type.
Trait Implementations§
Source§impl Debug for OneTimeKeys
impl Debug for OneTimeKeys
Source§impl<'de> Deserialize<'de> for OneTimeKeys
impl<'de> Deserialize<'de> for OneTimeKeys
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 PartialEq for OneTimeKeys
impl PartialEq for OneTimeKeys
impl StructuralPartialEq for OneTimeKeys
Auto Trait Implementations§
impl Freeze for OneTimeKeys
impl RefUnwindSafe for OneTimeKeys
impl Send for OneTimeKeys
impl Sync for OneTimeKeys
impl Unpin for OneTimeKeys
impl UnwindSafe for OneTimeKeys
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