pub struct TrustedDevice { /* private fields */ }Expand description
Device that has been trusted.
Implementations§
Source§impl TrustedDevice
impl TrustedDevice
Sourcepub fn new(
public_key: DevicePublicKey,
extra_info: Option<DeviceMetaData>,
created_date: Option<OffsetDateTime>,
) -> Self
pub fn new( public_key: DevicePublicKey, extra_info: Option<DeviceMetaData>, created_date: Option<OffsetDateTime>, ) -> Self
Create a new trusted device.
Sourcepub fn public_key(&self) -> &DevicePublicKey
pub fn public_key(&self) -> &DevicePublicKey
Device public key.
Sourcepub fn public_id(&self) -> Result<String, Error>
pub fn public_id(&self) -> Result<String, Error>
Public identifier derived from the public key (base58 encoded).
Sourcepub fn extra_info(&self) -> &DeviceMetaData
pub fn extra_info(&self) -> &DeviceMetaData
Extra device information.
Sourcepub fn created_date(&self) -> &OffsetDateTime
pub fn created_date(&self) -> &OffsetDateTime
Date and time this trusted device was created.
Trait Implementations§
Source§impl Clone for TrustedDevice
impl Clone for TrustedDevice
Source§fn clone(&self) -> TrustedDevice
fn clone(&self) -> TrustedDevice
Returns a duplicate 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 moreSource§impl Debug for TrustedDevice
impl Debug for TrustedDevice
Source§impl<'de> Deserialize<'de> for TrustedDevice
impl<'de> Deserialize<'de> for TrustedDevice
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 From<DevicePublicKey> for TrustedDevice
impl From<DevicePublicKey> for TrustedDevice
Source§fn from(value: DevicePublicKey) -> Self
fn from(value: DevicePublicKey) -> Self
Converts to this type from the input type.
Source§impl Hash for TrustedDevice
impl Hash for TrustedDevice
Source§impl PartialEq for TrustedDevice
impl PartialEq for TrustedDevice
Source§impl Serialize for TrustedDevice
impl Serialize for TrustedDevice
Source§impl TryFrom<&TrustedDevice> for (DevicePublicKey, String)
impl TryFrom<&TrustedDevice> for (DevicePublicKey, String)
impl Eq for TrustedDevice
Auto Trait Implementations§
impl Freeze for TrustedDevice
impl RefUnwindSafe for TrustedDevice
impl Send for TrustedDevice
impl Sync for TrustedDevice
impl Unpin for TrustedDevice
impl UnwindSafe for TrustedDevice
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