pub struct Auth<'a> {
pub otp: Otp<'a>,
pub label: Label<'a>,
}
Available on crate feature
auth
only.Expand description
Represents OTP authentication.
Fields§
§otp: Otp<'a>
The OTP configuration.
label: Label<'a>
The authentication label.
Implementations§
Source§impl<'a> Auth<'a>
impl<'a> Auth<'a>
Sourcepub fn builder() -> AuthBuilder<'a>
pub fn builder() -> AuthBuilder<'a>
Create an instance of Auth
using the builder syntax
Source§impl<'a> Auth<'a>
impl<'a> Auth<'a>
Sourcepub fn from_parts(parts: Parts<'a>) -> Self
pub fn from_parts(parts: Parts<'a>) -> Self
Constructs Self
from parts.
Sourcepub fn into_parts(self) -> Parts<'a>
pub fn into_parts(self) -> Parts<'a>
Consumes Self
, returning the contained parts.
Source§impl Auth<'_>
impl Auth<'_>
Sourcepub fn base_url(&self) -> Url
pub fn base_url(&self) -> Url
Constructs the OTP URL base.
§Panics
The base URL is always valid, so this method should never panic.
Sourcepub fn build_url(&self) -> Url
pub fn build_url(&self) -> Url
Builds the OTP URL, applying query parameters to the base URL created.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Auth<'a>
impl<'de, 'a> Deserialize<'de> for Auth<'a>
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
impl<'a> Eq for Auth<'a>
impl<'a> StructuralPartialEq for Auth<'a>
Auto Trait Implementations§
impl<'a> Freeze for Auth<'a>
impl<'a> RefUnwindSafe for Auth<'a>
impl<'a> Send for Auth<'a>
impl<'a> Sync for Auth<'a>
impl<'a> Unpin for Auth<'a>
impl<'a> UnwindSafe for Auth<'a>
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