Type Alias DeviceSignatures

Source
pub type DeviceSignatures = Signatures<OwnedUserId, DeviceId>;
Expand description

Map of device signatures, grouped by user.

Aliased Type§

struct DeviceSignatures(/* private fields */);

Implementations

Source§

impl<E, K> Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source

pub fn new() -> Signatures<E, K>

Available on crate feature events only.

Creates an empty signature map.

Source

pub fn insert_signature( &mut self, entity: E, key_identifier: OwnedKeyId<SigningKeyAlgorithm, K>, value: String, ) -> Option<String>

Available on crate feature events only.

Add a signature for the given entity and key identifier.

If there was already one, it is returned.

Trait Implementations

Source§

impl<E, K> Clone for Signatures<E, K>
where E: Ord + Clone, K: KeyName + ?Sized,

Source§

fn clone(&self) -> Signatures<E, K>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E, K> Debug for Signatures<E, K>
where E: Debug + Ord, K: Debug + KeyName + ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<E, K> Default for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

fn default() -> Signatures<E, K>

Returns the “default value” for a type. Read more
Source§

impl<E, K> Deref for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

type Target = BTreeMap<E, BTreeMap<OwnedKeyId<SigningKeyAlgorithm, K>, String>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Signatures<E, K> as Deref>::Target

Dereferences the value.
Source§

impl<E, K> DerefMut for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

fn deref_mut(&mut self) -> &mut <Signatures<E, K> as Deref>::Target

Mutably dereferences the value.
Source§

impl<'de, E, K> Deserialize<'de> for Signatures<E, K>
where E: Ord + DeserializeOwned, K: KeyName + ?Sized,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Signatures<E, K>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<E, K> Extend<(E, OwnedKeyId<SigningKeyAlgorithm, K>, String)> for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

fn extend<T>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<E, K, const N: usize> From<[(E, OwnedKeyId<SigningKeyAlgorithm, K>, String); N]> for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

fn from( value: [(E, OwnedKeyId<SigningKeyAlgorithm, K>, String); N], ) -> Signatures<E, K>

Converts to this type from the input type.
Source§

impl<E, K> FromIterator<(E, OwnedKeyId<SigningKeyAlgorithm, K>, String)> for Signatures<E, K>
where E: Ord, K: KeyName + ?Sized,

Source§

fn from_iter<T>(iter: T) -> Signatures<E, K>

Creates a value from an iterator. Read more
Source§

impl<E, K> IntoIterator for Signatures<E, K>
where E: Ord + Clone, K: KeyName + ?Sized,

Source§

type Item = (E, OwnedKeyId<SigningKeyAlgorithm, K>, String)

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<E, K>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <Signatures<E, K> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<E, K> Serialize for Signatures<E, K>
where E: Ord + Serialize, K: KeyName + ?Sized,

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more