pub struct CredentialIdLength(/* private fields */);Expand description
The length of credentialId that should be randomly generated during a credential creation operation.
The value has a maximum of 64 per the webauthn specification. The minimum is a library enforced as 16.
It is recommended to randomize this if possible to avoid authenticator fingerprinting.
Implementations§
Source§impl CredentialIdLength
impl CredentialIdLength
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The default length of a credentialId to generate.
This value is the same as Self::default, but available in
const contexts.
Sourcepub fn randomized<Rng: RngBackend>() -> Self
pub fn randomized<Rng: RngBackend>() -> Self
Generates and returns a uniformly random CredentialIdLength.
Trait Implementations§
Source§impl Clone for CredentialIdLength
impl Clone for CredentialIdLength
impl Copy for CredentialIdLength
Source§impl Debug for CredentialIdLength
impl Debug for CredentialIdLength
Source§impl Default for CredentialIdLength
impl Default for CredentialIdLength
Source§impl From<CredentialIdLength> for usize
impl From<CredentialIdLength> for usize
Source§fn from(value: CredentialIdLength) -> Self
fn from(value: CredentialIdLength) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CredentialIdLength
impl RefUnwindSafe for CredentialIdLength
impl Send for CredentialIdLength
impl Sync for CredentialIdLength
impl Unpin for CredentialIdLength
impl UnsafeUnpin for CredentialIdLength
impl UnwindSafe for CredentialIdLength
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