Struct matrix_sdk_base::ruma::DeviceKeyId
pub struct DeviceKeyId(/* private fields */);
Expand description
A key algorithm and a device id, combined with a ‘:’.
Implementations§
§impl DeviceKeyId
impl DeviceKeyId
§impl DeviceKeyId
impl DeviceKeyId
pub 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.
pub fn parse_box(
s: impl AsRef<str> + Into<Box<str>>
) -> Result<Box<DeviceKeyId>, Error>
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>> ) -> Result<Box<DeviceKeyId>, 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.
§impl DeviceKeyId
impl DeviceKeyId
pub 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
.
pub fn algorithm(&self) -> DeviceKeyAlgorithm
pub fn algorithm(&self) -> DeviceKeyAlgorithm
Returns key algorithm of the device key ID.
Trait Implementations§
§impl AsRef<[u8]> for DeviceKeyId
impl AsRef<[u8]> for DeviceKeyId
§impl AsRef<DeviceKeyId> for DeviceKeyId
impl AsRef<DeviceKeyId> for DeviceKeyId
§fn as_ref(&self) -> &DeviceKeyId
fn as_ref(&self) -> &DeviceKeyId
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<DeviceKeyId> for OwnedDeviceKeyId
impl AsRef<DeviceKeyId> for OwnedDeviceKeyId
§fn as_ref(&self) -> &DeviceKeyId
fn as_ref(&self) -> &DeviceKeyId
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<str> for DeviceKeyId
impl AsRef<str> for DeviceKeyId
§impl Borrow<DeviceKeyId> for OwnedDeviceKeyId
impl Borrow<DeviceKeyId> for OwnedDeviceKeyId
§fn borrow(&self) -> &DeviceKeyId
fn borrow(&self) -> &DeviceKeyId
Immutably borrows from an owned value. Read more
§impl Clone for Box<DeviceKeyId>
impl Clone for Box<DeviceKeyId>
§fn clone(&self) -> Box<DeviceKeyId>
fn clone(&self) -> Box<DeviceKeyId>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for DeviceKeyId
impl Debug for DeviceKeyId
§impl<'de> Deserialize<'de> for Box<DeviceKeyId>
impl<'de> Deserialize<'de> for Box<DeviceKeyId>
§fn deserialize<D>(
deserializer: D
) -> Result<Box<DeviceKeyId>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Box<DeviceKeyId>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for DeviceKeyId
impl Display for DeviceKeyId
§impl From<&DeviceKeyId> for Arc<DeviceKeyId>
impl From<&DeviceKeyId> for Arc<DeviceKeyId>
§fn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Arc<DeviceKeyId>
Converts to this type from the input type.
§impl From<&DeviceKeyId> for Box<DeviceKeyId>
impl From<&DeviceKeyId> for Box<DeviceKeyId>
§fn from(id: &DeviceKeyId) -> Box<DeviceKeyId>
fn from(id: &DeviceKeyId) -> Box<DeviceKeyId>
Converts to this type from the input type.
§impl From<&DeviceKeyId> for OwnedDeviceKeyId
impl From<&DeviceKeyId> for OwnedDeviceKeyId
§fn from(id: &DeviceKeyId) -> OwnedDeviceKeyId
fn from(id: &DeviceKeyId) -> OwnedDeviceKeyId
Converts to this type from the input type.
§impl From<&DeviceKeyId> for Rc<DeviceKeyId>
impl From<&DeviceKeyId> for Rc<DeviceKeyId>
§fn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
fn from(s: &DeviceKeyId) -> Rc<DeviceKeyId>
Converts to this type from the input type.
§impl From<&DeviceKeyId> for String
impl From<&DeviceKeyId> for String
§fn from(id: &DeviceKeyId) -> String
fn from(id: &DeviceKeyId) -> String
Converts to this type from the input type.
§impl From<OwnedDeviceKeyId> for Box<DeviceKeyId>
impl From<OwnedDeviceKeyId> for Box<DeviceKeyId>
§fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId>
fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId>
Converts to this type from the input type.
§impl Hash for DeviceKeyId
impl Hash for DeviceKeyId
§impl Ord for DeviceKeyId
impl Ord for DeviceKeyId
§impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
§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 ==
.§impl PartialEq<&str> for DeviceKeyId
impl PartialEq<&str> for DeviceKeyId
§impl PartialEq<Box<DeviceKeyId>> for &DeviceKeyId
impl PartialEq<Box<DeviceKeyId>> for &DeviceKeyId
§fn eq(&self, other: &Box<DeviceKeyId>) -> bool
fn eq(&self, other: &Box<DeviceKeyId>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<Box<DeviceKeyId>> for DeviceKeyId
impl PartialEq<Box<DeviceKeyId>> for DeviceKeyId
§fn eq(&self, other: &Box<DeviceKeyId>) -> bool
fn eq(&self, other: &Box<DeviceKeyId>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<DeviceKeyId> for &str
impl PartialEq<DeviceKeyId> for &str
§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 ==
.§impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
§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 ==
.§impl PartialEq<DeviceKeyId> for String
impl PartialEq<DeviceKeyId> for String
§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 ==
.§impl PartialEq<DeviceKeyId> for str
impl PartialEq<DeviceKeyId> for str
§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 ==
.§impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
§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 ==
.§impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
§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 ==
.§impl PartialEq<String> for DeviceKeyId
impl PartialEq<String> for DeviceKeyId
§impl PartialEq<str> for DeviceKeyId
impl PartialEq<str> for DeviceKeyId
§impl PartialEq for DeviceKeyId
impl PartialEq for DeviceKeyId
§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 ==
.§impl PartialOrd for DeviceKeyId
impl PartialOrd for DeviceKeyId
§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 more§impl Serialize for DeviceKeyId
impl Serialize for DeviceKeyId
§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
§impl ToOwned for DeviceKeyId
impl ToOwned for DeviceKeyId
§type Owned = OwnedDeviceKeyId
type Owned = OwnedDeviceKeyId
The resulting type after obtaining ownership.
§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
§impl<'a> TryFrom<&'a str> for &'a DeviceKeyId
impl<'a> TryFrom<&'a str> for &'a DeviceKeyId
§impl TryFrom<&str> for Box<DeviceKeyId>
impl TryFrom<&str> for Box<DeviceKeyId>
§impl TryFrom<String> for Box<DeviceKeyId>
impl TryFrom<String> for Box<DeviceKeyId>
impl Eq for DeviceKeyId
impl StructuralEq for DeviceKeyId
impl StructuralPartialEq for DeviceKeyId
Auto Trait Implementations§
impl RefUnwindSafe for DeviceKeyId
impl Send for DeviceKeyId
impl !Sized for DeviceKeyId
impl Sync for DeviceKeyId
impl Unpin for DeviceKeyId
impl UnwindSafe for DeviceKeyId
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.