Struct matrix_sdk_crypto::types::Signatures
source · [−]pub struct Signatures(_);Expand description
Signatures for a signed object.
Implementations
sourceimpl Signatures
impl Signatures
sourcepub fn add_signature(
&mut self,
signer: OwnedUserId,
key_id: OwnedDeviceKeyId,
signature: Ed25519Signature
) -> Option<Result<Signature, InvalidSignature>>
pub fn add_signature(
&mut self,
signer: OwnedUserId,
key_id: OwnedDeviceKeyId,
signature: Ed25519Signature
) -> Option<Result<Signature, InvalidSignature>>
Add the given signature from the given signer and the given key_id to the collection.
sourcepub fn get_signature(
&self,
signer: &UserId,
key_id: &DeviceKeyId
) -> Option<Ed25519Signature>
pub fn get_signature(
&self,
signer: &UserId,
key_id: &DeviceKeyId
) -> Option<Ed25519Signature>
Try to find an Ed25519 signature from the given signer with the given key id.
sourcepub fn get(
&self,
signer: &UserId
) -> Option<&BTreeMap<OwnedDeviceKeyId, Result<Signature, InvalidSignature>>>
pub fn get(
&self,
signer: &UserId
) -> Option<&BTreeMap<OwnedDeviceKeyId, Result<Signature, InvalidSignature>>>
Get the map of signatures that belong to the given user.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Do we hold any signatures or is our collection completely empty.
sourcepub fn signature_count(&self) -> usize
pub fn signature_count(&self) -> usize
How many signatures do we currently hold.
Trait Implementations
sourceimpl Clone for Signatures
impl Clone for Signatures
sourcefn clone(&self) -> Signatures
fn clone(&self) -> Signatures
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for Signatures
impl Debug for Signatures
sourceimpl Default for Signatures
impl Default for Signatures
sourceimpl<'de> Deserialize<'de> for Signatures
impl<'de> Deserialize<'de> for Signatures
sourcefn 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
sourceimpl IntoIterator for Signatures
impl IntoIterator for Signatures
type Item = (OwnedUserId, BTreeMap<OwnedDeviceKeyId, Result<Signature, InvalidSignature>, Global>)
type Item = (OwnedUserId, BTreeMap<OwnedDeviceKeyId, Result<Signature, InvalidSignature>, Global>)
The type of the elements being iterated over.
sourceimpl PartialEq<Signatures> for Signatures
impl PartialEq<Signatures> for Signatures
sourcefn eq(&self, other: &Signatures) -> bool
fn eq(&self, other: &Signatures) -> bool
sourceimpl Serialize for Signatures
impl Serialize for Signatures
impl Eq for Signatures
impl StructuralEq for Signatures
impl StructuralPartialEq for Signatures
Auto Trait Implementations
impl RefUnwindSafe for Signatures
impl Send for Signatures
impl Sync for Signatures
impl Unpin for Signatures
impl UnwindSafe for Signatures
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.