Struct matrix_sdk_crypto::types::Signatures
source · pub struct Signatures(/* private fields */);
Expand description
Signatures for a signed object.
Implementations§
source§impl 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§
source§impl Clone for Signatures
impl Clone for Signatures
source§fn clone(&self) -> Signatures
fn clone(&self) -> Signatures
Returns a copy 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 Signatures
impl Debug for Signatures
source§impl Default for Signatures
impl Default for Signatures
source§impl<'de> Deserialize<'de> for Signatures
impl<'de> Deserialize<'de> for Signatures
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 Signatures
impl IntoIterator for Signatures
source§impl PartialEq for Signatures
impl PartialEq for Signatures
source§fn eq(&self, other: &Signatures) -> bool
fn eq(&self, other: &Signatures) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl 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§
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.