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§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.
Source§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§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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
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, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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