pub struct MasterPubkey(/* private fields */);
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§
Source§impl MasterPubkey
impl MasterPubkey
Sourcepub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
pub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
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§
Source§impl AsMut<CrossSigningKey> for MasterPubkey
impl AsMut<CrossSigningKey> for MasterPubkey
Source§fn as_mut(&mut self) -> &mut CrossSigningKey
fn as_mut(&mut self) -> &mut CrossSigningKey
Source§impl AsRef<CrossSigningKey> for MasterPubkey
impl AsRef<CrossSigningKey> for MasterPubkey
Source§fn as_ref(&self) -> &CrossSigningKey
fn as_ref(&self) -> &CrossSigningKey
Source§impl Clone for MasterPubkey
impl Clone for MasterPubkey
Source§fn clone(&self) -> MasterPubkey
fn clone(&self) -> MasterPubkey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MasterPubkey
impl Debug for MasterPubkey
Source§impl<'de> Deserialize<'de> for MasterPubkey
impl<'de> Deserialize<'de> for MasterPubkey
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>,
Source§impl<'a> IntoIterator for &'a MasterPubkey
impl<'a> IntoIterator for &'a MasterPubkey
Source§type Item = (&'a OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, &'a SigningKey)
type Item = (&'a OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, &'a SigningKey)
Source§type IntoIter = Iter<'a, OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, SigningKey>
type IntoIter = Iter<'a, OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, SigningKey>
Source§impl PartialEq for MasterPubkey
impl PartialEq for MasterPubkey
Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
The PartialEq
implementation compares the user ID, the usage and the
key material, ignoring signatures.
The usage could be safely ignored since the type guarantees it has the correct usage by construction – it is impossible to construct a value of a particular key type with an incorrect usage. However, we check it anyway, to codify the notion that the same key material with a different usage results in a logically different key.
The signatures are provided by other devices and don’t alter the identity of the key itself.
Source§impl Serialize for MasterPubkey
impl Serialize for MasterPubkey
Source§impl TryFrom<CrossSigningKey> for MasterPubkey
impl TryFrom<CrossSigningKey> for MasterPubkey
impl Eq for MasterPubkey
Auto Trait Implementations§
impl Freeze for MasterPubkey
impl RefUnwindSafe for MasterPubkey
impl Send for MasterPubkey
impl Sync for MasterPubkey
impl Unpin for MasterPubkey
impl UnwindSafe for MasterPubkey
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
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
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>
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>
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>
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