pub struct UserCreateScheme {
pub first_name: String,
pub last_name: String,
pub username: String,
pub is_admin: bool,
pub pwd: String,
}Expand description
Payload for creating a new user account.
Used in both admin registration (/api/register) and initial setup (/api/setup-admin).
The password is hashed server-side before storage using Argon2. Converted to User for storage.
§Fields
first_name: User’s first namelast_name: User’s last nameusername: Unique username for loginis_admin: Whether to grant admin privileges (setup endpoint always sets this to true)pwd: Plain text password (hashed on server)
Fields§
§first_name: StringUser’s first name
last_name: StringUser’s last name
username: StringUnique username for login
is_admin: boolWhether to grant admin privileges
pwd: StringPlain text password (hashed on server before storage)
Trait Implementations§
Source§impl Debug for UserCreateScheme
impl Debug for UserCreateScheme
Source§impl<'de> Deserialize<'de> for UserCreateScheme
impl<'de> Deserialize<'de> for UserCreateScheme
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
Source§impl<'a, R: Row> FromRow<'a, R> for UserCreateScheme
impl<'a, R: Row> FromRow<'a, R> for UserCreateScheme
Auto Trait Implementations§
impl Freeze for UserCreateScheme
impl RefUnwindSafe for UserCreateScheme
impl Send for UserCreateScheme
impl Sync for UserCreateScheme
impl Unpin for UserCreateScheme
impl UnwindSafe for UserCreateScheme
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
§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>
Converts
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>
Converts
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