pub struct DeviceKeyId(/* private fields */);
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, IdParseError>
pub fn parse(s: impl AsRef<str>) -> Result<OwnedDeviceKeyId, IdParseError>
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>>,
) -> Result<Box<Self>, IdParseError>
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<Self>, IdParseError>
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<[u8]> for DeviceKeyId
impl AsRef<[u8]> for DeviceKeyId
Source§impl AsRef<DeviceKeyId> for DeviceKeyId
impl AsRef<DeviceKeyId> for DeviceKeyId
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<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 Clone for Box<DeviceKeyId>
impl Clone for Box<DeviceKeyId>
Source§impl Debug for DeviceKeyId
impl Debug for DeviceKeyId
Source§impl<'de> Deserialize<'de> for Box<DeviceKeyId>
impl<'de> Deserialize<'de> for Box<DeviceKeyId>
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>,
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>
impl From<&DeviceKeyId> for Box<DeviceKeyId>
Source§fn from(id: &DeviceKeyId) -> Self
fn from(id: &DeviceKeyId) -> Self
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) -> Self
fn from(id: &DeviceKeyId) -> Self
Converts to this type from the input type.
Source§impl From<OwnedDeviceKeyId> for Box<DeviceKeyId>
impl From<OwnedDeviceKeyId> for Box<DeviceKeyId>
Source§fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId>
fn from(a: OwnedDeviceKeyId) -> Box<DeviceKeyId>
Converts to this type from the input type.
Source§impl FromStr for Box<DeviceKeyId>
impl FromStr for Box<DeviceKeyId>
Source§impl Hash for DeviceKeyId
impl Hash for DeviceKeyId
Source§impl Ord for DeviceKeyId
impl Ord for DeviceKeyId
Source§impl PartialEq<&DeviceKeyId> for Box<DeviceKeyId>
impl PartialEq<&DeviceKeyId> for Box<DeviceKeyId>
Source§impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<&DeviceKeyId> for OwnedDeviceKeyId
Source§impl PartialEq<&str> for DeviceKeyId
impl PartialEq<&str> for DeviceKeyId
Source§impl PartialEq<Box<DeviceKeyId>> for &DeviceKeyId
impl PartialEq<Box<DeviceKeyId>> for &DeviceKeyId
Source§impl PartialEq<Box<DeviceKeyId>> for DeviceKeyId
impl PartialEq<Box<DeviceKeyId>> for DeviceKeyId
Source§impl PartialEq<DeviceKeyId> for &str
impl PartialEq<DeviceKeyId> for &str
Source§impl PartialEq<DeviceKeyId> for Box<DeviceKeyId>
impl PartialEq<DeviceKeyId> for Box<DeviceKeyId>
Source§impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
impl PartialEq<DeviceKeyId> for OwnedDeviceKeyId
Source§impl PartialEq<DeviceKeyId> for String
impl PartialEq<DeviceKeyId> for String
Source§impl PartialEq<DeviceKeyId> for str
impl PartialEq<DeviceKeyId> for str
Source§impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for &DeviceKeyId
Source§impl PartialEq<OwnedDeviceKeyId> for Box<DeviceKeyId>
impl PartialEq<OwnedDeviceKeyId> for Box<DeviceKeyId>
Source§impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
impl PartialEq<OwnedDeviceKeyId> for DeviceKeyId
Source§impl PartialEq<String> for DeviceKeyId
impl PartialEq<String> for DeviceKeyId
Source§impl PartialEq<str> for DeviceKeyId
impl PartialEq<str> for DeviceKeyId
Source§impl PartialEq for DeviceKeyId
impl PartialEq for DeviceKeyId
Source§impl PartialOrd for DeviceKeyId
impl PartialOrd for DeviceKeyId
Source§impl Serialize for DeviceKeyId
impl Serialize for DeviceKeyId
Source§impl ToOwned for DeviceKeyId
impl ToOwned for DeviceKeyId
Source§type Owned = OwnedDeviceKeyId
type Owned = OwnedDeviceKeyId
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::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
Source§impl<'a> TryFrom<&'a str> for &'a DeviceKeyId
impl<'a> TryFrom<&'a str> for &'a DeviceKeyId
impl Eq for DeviceKeyId
impl StructuralPartialEq for DeviceKeyId
Auto Trait Implementations§
impl Freeze for DeviceKeyId
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key
and return true
if they are equal.