Struct ruma::DeviceKeyId
source · pub struct DeviceKeyId(_);
Expand description
A key algorithm and a device id, combined with a ‘:’.
Implementations§
source§impl DeviceKeyId
impl DeviceKeyId
source§impl DeviceKeyId
impl DeviceKeyId
sourcepub fn parse(s: impl AsRef<str>) -> Result<OwnedDeviceKeyId, Error>
pub fn parse(s: impl AsRef<str>) -> Result<OwnedDeviceKeyId, Error>
Try parsing a &str
into an OwnedDeviceKeyId
.
The same can also be done using FromStr
, TryFrom
or TryInto
.
This function is simply more constrained and thus useful in generic contexts.
sourcepub fn parse_box(
s: impl AsRef<str> + Into<Box<str, Global>>
) -> Result<Box<DeviceKeyId, Global>, Error>
pub fn parse_box(
s: impl AsRef<str> + Into<Box<str, Global>>
) -> Result<Box<DeviceKeyId, Global>, 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.
source§impl DeviceKeyId
impl DeviceKeyId
sourcepub fn from_parts(
algorithm: DeviceKeyAlgorithm,
device_id: &DeviceId
) -> OwnedDeviceKeyId
pub fn from_parts(
algorithm: DeviceKeyAlgorithm,
device_id: &DeviceId
) -> OwnedDeviceKeyId
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§
source§impl AsRef<DeviceKeyId> for OwnedDeviceKeyId
impl AsRef<DeviceKeyId> for OwnedDeviceKeyId
source§fn as_ref(&self) -> &DeviceKeyId
fn as_ref(&self) -> &DeviceKeyId
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<str> for DeviceKeyId
impl AsRef<str> for DeviceKeyId
source§impl Borrow<DeviceKeyId> for OwnedDeviceKeyId
impl Borrow<DeviceKeyId> for OwnedDeviceKeyId
source§fn borrow(&self) -> &DeviceKeyId
fn borrow(&self) -> &DeviceKeyId
Immutably borrows from an owned value. Read more
source§impl Debug for DeviceKeyId
impl Debug for DeviceKeyId
source§impl<'de> Deserialize<'de> for Box<DeviceKeyId, Global>
impl<'de> Deserialize<'de> for Box<DeviceKeyId, Global>
source§fn deserialize<D>(
deserializer: D
) -> Result<Box<DeviceKeyId, Global>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Box<DeviceKeyId, Global>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for DeviceKeyId
impl Display for DeviceKeyId
source§impl From<&DeviceKeyId> for Arc<DeviceKeyId>
impl From<&DeviceKeyId> for Arc<DeviceKeyId>
source§fn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
Converts to this type from the input type.
source§impl From<&DeviceKeyId> for Box<DeviceKeyId, Global>
impl From<&DeviceKeyId> for Box<DeviceKeyId, Global>
source§fn from(id: &DeviceKeyId) -> Box<DeviceKeyId, Global>
fn from(id: &DeviceKeyId) -> Box<DeviceKeyId, Global>
Converts to this type from the input type.
source§impl From<&DeviceKeyId> for OwnedDeviceKeyId
impl From<&DeviceKeyId> for OwnedDeviceKeyId
source§fn from(id: &DeviceKeyId) -> OwnedDeviceKeyId
fn from(id: &DeviceKeyId) -> OwnedDeviceKeyId
Converts to this type from the input type.
source§impl From<&DeviceKeyId> for Rc<DeviceKeyId>
impl From<&DeviceKeyId> for Rc<DeviceKeyId>
source§fn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
Converts to this type from the input type.
source§impl From<&DeviceKeyId> for String
impl From<&DeviceKeyId> for String
source§fn from(id: &DeviceKeyId) -> String
fn from(id: &DeviceKeyId) -> String
Converts to this type from the input type.
source§impl From<OwnedDeviceKeyId> for Box<DeviceKeyId, Global>
impl From<OwnedDeviceKeyId> for Box<DeviceKeyId, Global>
source§fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId, Global>
fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId, Global>
Converts to this type from the input type.
source§impl Hash for DeviceKeyId
impl Hash for DeviceKeyId
source§impl Ord for DeviceKeyId
impl Ord for DeviceKeyId
source§impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
source§fn 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 ==
.source§impl PartialEq<&str> for DeviceKeyId
impl PartialEq<&str> for DeviceKeyId
source§impl PartialEq<Box<DeviceKeyId, Global>> for &DeviceKeyId
impl PartialEq<Box<DeviceKeyId, Global>> for &DeviceKeyId
source§impl PartialEq<Box<DeviceKeyId, Global>> for DeviceKeyId
impl PartialEq<Box<DeviceKeyId, Global>> for DeviceKeyId
source§impl PartialEq<DeviceKeyId> for &str
impl PartialEq<DeviceKeyId> for &str
source§fn 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 ==
.source§impl PartialEq<DeviceKeyId> for DeviceKeyId
impl PartialEq<DeviceKeyId> for DeviceKeyId
source§fn 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 ==
.source§impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
source§fn 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 ==
.source§impl PartialEq<DeviceKeyId> for str
impl PartialEq<DeviceKeyId> for str
source§fn 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 ==
.source§impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
source§fn eq(&self, other: &OwnedDeviceKeyId) -> bool
fn eq(&self, other: &OwnedDeviceKeyId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
source§fn eq(&self, other: &OwnedDeviceKeyId) -> bool
fn eq(&self, other: &OwnedDeviceKeyId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<String> for DeviceKeyId
impl PartialEq<String> for DeviceKeyId
source§impl PartialEq<str> for DeviceKeyId
impl PartialEq<str> for DeviceKeyId
source§impl PartialOrd<DeviceKeyId> for DeviceKeyId
impl PartialOrd<DeviceKeyId> for DeviceKeyId
source§fn partial_cmp(&self, other: &DeviceKeyId) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceKeyId) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Serialize for DeviceKeyId
impl Serialize for DeviceKeyId
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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
source§impl ToOwned for DeviceKeyId
impl ToOwned for DeviceKeyId
§type Owned = OwnedDeviceKeyId
type Owned = OwnedDeviceKeyId
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> <DeviceKeyId as ToOwned>::Owned
fn to_owned(&self) -> <DeviceKeyId as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more