pub enum AuthenticatorAttachment {
None,
Platform,
CrossPlatform,
}Expand description
Variants§
Trait Implementations§
Source§impl Clone for AuthenticatorAttachment
impl Clone for AuthenticatorAttachment
impl Copy for AuthenticatorAttachment
Source§impl Debug for AuthenticatorAttachment
impl Debug for AuthenticatorAttachment
Source§impl Default for AuthenticatorAttachment
impl Default for AuthenticatorAttachment
Source§impl<'de> Deserialize<'de> for AuthenticatorAttachment
Available on crate feature serde only.
impl<'de> Deserialize<'de> for AuthenticatorAttachment
Available on crate feature
serde only.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>,
Deserializes str based on
AuthenticatorAttachment.
§Examples
assert!(matches!(
serde_json::from_str::<AuthenticatorAttachment>(r#""cross-platform""#)?,
AuthenticatorAttachment::CrossPlatform)
);
assert!(matches!(
serde_json::from_str::<AuthenticatorAttachment>(r#""platform""#)?,
AuthenticatorAttachment::Platform)
);
// Case matters.
assert!(serde_json::from_str::<AuthenticatorAttachment>(r#""Platform""#).is_err());
// `AuthenticatorAttachment::None` is not deserializable.
assert!(serde_json::from_str::<AuthenticatorAttachment>(r#""""#).is_err());
assert!(serde_json::from_str::<AuthenticatorAttachment>("null").is_err());
assert!(serde_json::from_str::<AuthenticatorAttachment>(r#""none""#).is_err());
assert!(serde_json::from_str::<AuthenticatorAttachment>(r#""None""#).is_err());impl Eq for AuthenticatorAttachment
Source§impl PartialEq for AuthenticatorAttachment
impl PartialEq for AuthenticatorAttachment
impl StructuralPartialEq for AuthenticatorAttachment
Auto Trait Implementations§
impl Freeze for AuthenticatorAttachment
impl RefUnwindSafe for AuthenticatorAttachment
impl Send for AuthenticatorAttachment
impl Sync for AuthenticatorAttachment
impl Unpin for AuthenticatorAttachment
impl UnsafeUnpin for AuthenticatorAttachment
impl UnwindSafe for AuthenticatorAttachment
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