pub struct PinId(/* private fields */);Expand description
The ID of a PIN within the namespace of a client.
It is recommended that applications use an enum that implements Into<PinId>.
§Examples
use trussed_auth::PinId;
#[repr(u8)]
enum Pin {
User = 0,
Admin = 1,
ResetCode = 2,
}
impl From<Pin> for PinId {
fn from(pin: Pin) -> Self {
(pin as u8).into()
}
}Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PinId
impl<'de> Deserialize<'de> for PinId
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 Ord for PinId
impl Ord for PinId
Source§impl PartialOrd for PinId
impl PartialOrd for PinId
impl Copy for PinId
impl Eq for PinId
impl StructuralPartialEq for PinId
Auto Trait Implementations§
impl Freeze for PinId
impl RefUnwindSafe for PinId
impl Send for PinId
impl Sync for PinId
impl Unpin for PinId
impl UnwindSafe for PinId
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