pub struct AuthMetadata { /* private fields */ }Expand description
Login metadata sent with auth code and verification requests.
Implementations§
Source§impl AuthMetadata
impl AuthMetadata
Sourcepub fn new(device_id: impl Into<String>, client: ClientIdentity) -> Self
pub fn new(device_id: impl Into<String>, client: ClientIdentity) -> Self
Creates auth metadata for a durable device id and client identity.
Sourcepub fn sdk(device_id: impl Into<String>) -> Self
pub fn sdk(device_id: impl Into<String>) -> Self
Creates auth metadata using the default SDK client identity.
Sourcepub fn with_device_name(self, device_name: impl Into<String>) -> Self
pub fn with_device_name(self, device_name: impl Into<String>) -> Self
Attaches a human-readable device name.
Sourcepub fn device_name(&self) -> Option<&str>
pub fn device_name(&self) -> Option<&str>
Returns the optional human-readable device name.
Sourcepub fn client(&self) -> &ClientIdentity
pub fn client(&self) -> &ClientIdentity
Returns the client identity used for auth requests.
Trait Implementations§
Source§impl Clone for AuthMetadata
impl Clone for AuthMetadata
Source§fn clone(&self) -> AuthMetadata
fn clone(&self) -> AuthMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AuthMetadata
impl Debug for AuthMetadata
impl Eq for AuthMetadata
Source§impl PartialEq for AuthMetadata
impl PartialEq for AuthMetadata
Source§fn eq(&self, other: &AuthMetadata) -> bool
fn eq(&self, other: &AuthMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AuthMetadata
Auto Trait Implementations§
impl Freeze for AuthMetadata
impl RefUnwindSafe for AuthMetadata
impl Send for AuthMetadata
impl Sync for AuthMetadata
impl Unpin for AuthMetadata
impl UnsafeUnpin for AuthMetadata
impl UnwindSafe for AuthMetadata
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