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
§type Item = (OwnedUserId, BTreeMap<OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, Result<Signature, InvalidSignature>>)
type Item = (OwnedUserId, BTreeMap<OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, Result<Signature, InvalidSignature>>)
The type of the elements being iterated over.
§type IntoIter = IntoIter<OwnedUserId, BTreeMap<OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, Result<Signature, InvalidSignature>>>
type IntoIter = IntoIter<OwnedUserId, BTreeMap<OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, Result<Signature, InvalidSignature>>>
Which kind of iterator are we turning this into?
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 StructuralPartialEq for Signatures
Auto Trait Implementations§
impl Freeze for Signatures
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more