Struct ruma_identifiers::DeviceKeyId
source · [−]#[repr(transparent)]pub struct DeviceKeyId(_);Expand description
A key algorithm and a device id, combined with a ‘:’.
Implementations
sourceimpl DeviceKeyId
impl DeviceKeyId
sourcepub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
pub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
Try parsing a &str into a Box<DeviceKeyId>.
The same can also be done using FromStr, TryFrom or TryInto.
This function is simply more constrained and thus useful in generic contexts.
sourceimpl DeviceKeyId
impl DeviceKeyId
sourceimpl DeviceKeyId
impl DeviceKeyId
sourcepub fn from_parts(
algorithm: DeviceKeyAlgorithm,
device_id: &DeviceId
) -> Box<Self>
pub fn from_parts(
algorithm: DeviceKeyAlgorithm,
device_id: &DeviceId
) -> Box<Self>
Create a DeviceKeyId from a DeviceKeyAlgorithm and a DeviceId.
sourcepub fn algorithm(&self) -> DeviceKeyAlgorithm
pub fn algorithm(&self) -> DeviceKeyAlgorithm
Returns key algorithm of the device key ID.
Trait Implementations
sourceimpl Debug for DeviceKeyId
impl Debug for DeviceKeyId
sourceimpl Display for DeviceKeyId
impl Display for DeviceKeyId
sourceimpl From<&'_ DeviceKeyId> for Box<DeviceKeyId>
impl From<&'_ DeviceKeyId> for Box<DeviceKeyId>
sourcefn from(id: &DeviceKeyId) -> Self
fn from(id: &DeviceKeyId) -> Self
Performs the conversion.
sourceimpl From<&'_ DeviceKeyId> for Rc<DeviceKeyId>
impl From<&'_ DeviceKeyId> for Rc<DeviceKeyId>
sourcefn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
Performs the conversion.
sourceimpl From<&'_ DeviceKeyId> for Arc<DeviceKeyId>
impl From<&'_ DeviceKeyId> for Arc<DeviceKeyId>
sourcefn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
Performs the conversion.
sourceimpl Hash for DeviceKeyId
impl Hash for DeviceKeyId
sourceimpl Ord for DeviceKeyId
impl Ord for DeviceKeyId
sourceimpl PartialEq<&'_ DeviceKeyId> for Box<DeviceKeyId>
impl PartialEq<&'_ DeviceKeyId> for Box<DeviceKeyId>
sourceimpl PartialEq<&'_ str> for DeviceKeyId
impl PartialEq<&'_ str> for DeviceKeyId
sourceimpl PartialEq<Box<DeviceKeyId, Global>> for DeviceKeyId
impl PartialEq<Box<DeviceKeyId, Global>> for DeviceKeyId
sourceimpl PartialEq<Box<DeviceKeyId, Global>> for &DeviceKeyId
impl PartialEq<Box<DeviceKeyId, Global>> for &DeviceKeyId
sourceimpl PartialEq<DeviceKeyId> for DeviceKeyId
impl PartialEq<DeviceKeyId> for DeviceKeyId
sourcefn eq(&self, other: &DeviceKeyId) -> bool
fn eq(&self, other: &DeviceKeyId) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DeviceKeyId) -> bool
fn ne(&self, other: &DeviceKeyId) -> bool
This method tests for !=.
sourceimpl PartialEq<DeviceKeyId> for Box<DeviceKeyId>
impl PartialEq<DeviceKeyId> for Box<DeviceKeyId>
sourceimpl PartialEq<DeviceKeyId> for str
impl PartialEq<DeviceKeyId> for str
sourceimpl PartialEq<DeviceKeyId> for &str
impl PartialEq<DeviceKeyId> for &str
sourceimpl PartialEq<DeviceKeyId> for String
impl PartialEq<DeviceKeyId> for String
sourceimpl PartialEq<String> for DeviceKeyId
impl PartialEq<String> for DeviceKeyId
sourceimpl PartialEq<str> for DeviceKeyId
impl PartialEq<str> for DeviceKeyId
sourceimpl PartialOrd<DeviceKeyId> for DeviceKeyId
impl PartialOrd<DeviceKeyId> for DeviceKeyId
sourcefn partial_cmp(&self, other: &DeviceKeyId) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceKeyId) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Serialize for DeviceKeyId
This is supported on crate feature serde only.
impl Serialize for DeviceKeyId
serde only.sourceimpl ToOwned for DeviceKeyId
impl ToOwned for DeviceKeyId
type Owned = Box<DeviceKeyId>
type Owned = Box<DeviceKeyId>
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
sourcefn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
