Type Alias ruma::ServerSignatures

source ·
pub type ServerSignatures = Signatures<OwnedServerName, OwnedKeyName>;
Expand description

Map of server signatures for an event, grouped by server.

Aliased Type§

struct ServerSignatures(/* private fields */);

Implementations

source§

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

source

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

Available on crate feature events only.

Creates an empty signature map.

source

pub fn insert( &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 server name and key identifier.

If there was already one, it is returned.

source

pub fn get<Q>( &self, entity: &Q, ) -> Option<&BTreeMap<OwnedKeyId<SigningKeyAlgorithm, K>, String>>
where E: Borrow<Q>, Q: Ord + ?Sized,

Available on crate feature events only.

Returns a reference to the signatures corresponding to the entities.

Trait Implementations

source§

impl<E, K> Clone for Signatures<E, K>
where E: Clone + Ord, K: Clone + ?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 + ?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: Default + Ord, K: Default + ?Sized,

source§

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

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

impl<'de, E, K> Deserialize<'de> for Signatures<E, K>
where E: Ord + Deserialize<'de>, K: Deserialize<'de> + ?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> Serialize for Signatures<E, K>
where E: Ord + Serialize, K: Serialize + ?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