#[non_exhaustive]pub struct NewAccount {
pub username: String,
pub password: String,
}Expand description
Inputs needed to create a user account.
All accounts store an authenticated encrypted credential bundle. Passwords
may be any string, including empty, with no length or complexity restrictions.
passwordless is sugar for an empty password, not a
different storage mode. Empty-string wrapping provides no meaningful
confidentiality against a bundle holder.
The struct is marked #[non_exhaustive] so we can add fields
(key algorithm, locale, initial roles, etc.) without a breaking API
change. Construct it through the provided helpers rather than struct
literal syntax.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.username: StringLogin identifier for the user. Must be unique within the instance.
password: StringPassword used to encrypt the local credential bundle. Every string, including empty, uses the same Argon2id and AES-256-GCM path.
Implementations§
Source§impl NewAccount
impl NewAccount
Sourcepub fn passwordless(name: impl Into<String>) -> Self
pub fn passwordless(name: impl Into<String>) -> Self
Create an empty-password account using the ordinary encrypted format. This provides no meaningful confidentiality against a bundle holder.
Trait Implementations§
Source§impl Clone for NewAccount
impl Clone for NewAccount
Source§fn clone(&self) -> NewAccount
fn clone(&self) -> NewAccount
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for NewAccount
impl RefUnwindSafe for NewAccount
impl Send for NewAccount
impl Sync for NewAccount
impl Unpin for NewAccount
impl UnsafeUnpin for NewAccount
impl UnwindSafe for NewAccount
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more