Struct matrix_sdk_crypto::MasterPubkey
source · [−]pub struct MasterPubkey(_);
Expand description
Wrapper for a cross signing key marking it as the master key.
Master keys are used to sign other cross signing keys, the self signing and user signing keys of an user will be signed by their master key.
Implementations
sourceimpl MasterPubkey
impl MasterPubkey
sourcepub fn keys(&self) -> &BTreeMap<OwnedDeviceKeyId, SigningKey>
pub fn keys(&self) -> &BTreeMap<OwnedDeviceKeyId, SigningKey>
Get the keys map of containing the master keys.
sourcepub fn signatures(&self) -> &Signatures
pub fn signatures(&self) -> &Signatures
Get the signatures map of this cross signing key.
sourcepub fn get_key(&self, key_id: &DeviceKeyId) -> Option<&SigningKey>
pub fn get_key(&self, key_id: &DeviceKeyId) -> Option<&SigningKey>
Get the master key with the given key id.
Arguments
key_id
- The id of the key that should be fetched.
sourcepub fn get_first_key(&self) -> Option<Ed25519PublicKey>
pub fn get_first_key(&self) -> Option<Ed25519PublicKey>
Get the first available master key.
There’s usually only a single master key so this will usually fetch the only key.
Trait Implementations
sourceimpl AsRef<CrossSigningKey> for MasterPubkey
impl AsRef<CrossSigningKey> for MasterPubkey
sourcefn as_ref(&self) -> &CrossSigningKey
fn as_ref(&self) -> &CrossSigningKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for MasterPubkey
impl Clone for MasterPubkey
sourcefn clone(&self) -> MasterPubkey
fn clone(&self) -> MasterPubkey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MasterPubkey
impl Debug for MasterPubkey
sourceimpl<'de> Deserialize<'de> for MasterPubkey
impl<'de> Deserialize<'de> for MasterPubkey
sourcefn 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
sourceimpl From<CrossSigningKey> for MasterPubkey
impl From<CrossSigningKey> for MasterPubkey
sourcefn from(key: CrossSigningKey) -> Self
fn from(key: CrossSigningKey) -> Self
Converts to this type from the input type.
sourceimpl<'a> IntoIterator for &'a MasterPubkey
impl<'a> IntoIterator for &'a MasterPubkey
type Item = (&'a OwnedDeviceKeyId, &'a SigningKey)
type Item = (&'a OwnedDeviceKeyId, &'a SigningKey)
The type of the elements being iterated over.
type IntoIter = Iter<'a, OwnedDeviceKeyId, SigningKey>
type IntoIter = Iter<'a, OwnedDeviceKeyId, SigningKey>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<MasterPubkey> for MasterPubkey
impl PartialEq<MasterPubkey> for MasterPubkey
sourceimpl Serialize for MasterPubkey
impl Serialize for MasterPubkey
Auto Trait Implementations
impl RefUnwindSafe for MasterPubkey
impl Send for MasterPubkey
impl Sync for MasterPubkey
impl Unpin for MasterPubkey
impl UnwindSafe for MasterPubkey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more