pub type OwnedOneTimeKeyId = OwnedKeyId<OneTimeKeyAlgorithm, OneTimeKeyName>;Expand description
Algorithm + key name for one-time and fallback keys.
Aliased Type§
pub struct OwnedOneTimeKeyId { /* private fields */ }Methods from Deref<Target = KeyId<A, K>>§
Sourcepub fn as_str(&self) -> &str
Available on crate feature events only.
pub fn as_str(&self) -> &str
events only.Extracts a string slice from this KeyId.
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
Available on crate feature events only.
pub fn as_bytes(&self) -> &[u8] ⓘ
events only.Extracts a byte slice from this KeyId.
Sourcepub fn algorithm(&self) -> A
Available on crate feature events only.
pub fn algorithm(&self) -> A
events only.Returns key algorithm of the key ID - the part that comes before the colon.
§Example
use ruma_common::{DeviceKeyAlgorithm, DeviceKeyId};
let k = DeviceKeyId::parse("ed25519:1").unwrap();
assert_eq!(k.algorithm(), DeviceKeyAlgorithm::Ed25519);