Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

UserPresenceOptions

pub struct UserPresenceOptions {
    pub security_key_index: Option<usize>,
    pub authentication: bool,
    pub rp_id: Option<String>,
    pub rp_name: Option<String>,
    pub user_name: Option<String>,
    pub user_display_name: Option<String>,
}
Expand description

Options for the User Presence navigation request.

ⓘ
let options = UserPresenceOptions::authentication(Some(0)).with_rp_id("foundation.xyz".to_string());

Fields

security_key_index: Option<usize>

The security key index to use, or None to allow the user to select one.

authentication: boolrp_id: Option<String>rp_name: Option<String>user_name: Option<String>user_display_name: Option<String>

Implementations

impl UserPresenceOptions

pub fn registration(security_key_index: Option<usize>) -> Self

Permission: not needed

pub fn authentication(security_key_index: Option<usize>) -> Self

Permission: not needed

pub fn with_rp_id(self, rp_id: String) -> Self

Permission: not needed

pub fn with_rp_name(self, rp_name: String) -> Self

Permission: not needed

pub fn with_user_name(self, user_name: String) -> Self

Permission: not needed

pub fn with_user_display_name(self, user_display_name: String) -> Self

Permission: not needed

pub fn from_slice(data: &[u8]) -> Option<Self>

Permission: not needed

pub fn serialize(&self) -> Vec<u8> ⓘ

Permission: not needed

Trait Implementations

impl Archive for UserPresenceOptions
where Option<usize>: Archive, bool: Archive, Option<String>: Archive,

const COPY_OPTIMIZATION: CopyOptimization<Self>

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more

type Archived = ArchivedUserPresenceOptions

The archived representation of this type. Read more

type Resolver = UserPresenceOptionsResolver

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.

fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)

Creates the archived version of this value at the given position and writes it to the given output. Read more

impl Clone for UserPresenceOptions

fn clone(&self) -> UserPresenceOptions

Returns a duplicate of the value. Read more
1.0.0

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for UserPresenceOptions

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

impl<__D: Fallible + ?Sized> Deserialize<UserPresenceOptions, __D> for Archived<UserPresenceOptions>
where Option<usize>: Archive, <Option<usize> as Archive>::Archived: Deserialize<Option<usize>, __D>, bool: Archive, <bool as Archive>::Archived: Deserialize<bool, __D>, Option<String>: Archive, <Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,

fn deserialize( &self, deserializer: &mut __D, ) -> Result<UserPresenceOptions, <__D as Fallible>::Error>

Deserializes using the given deserializer

impl<__S: Fallible + ?Sized> Serialize<__S> for UserPresenceOptions
where Option<usize>: Serialize<__S>, bool: Serialize<__S>, Option<String>: Serialize<__S>,

fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.

Auto Trait Implementations

impl Freeze for UserPresenceOptions

impl RefUnwindSafe for UserPresenceOptions

impl Send for UserPresenceOptions

impl Sync for UserPresenceOptions

impl Unpin for UserPresenceOptions

impl UnsafeUnpin for UserPresenceOptions

impl UnwindSafe for UserPresenceOptions