Struct dim_database::user::User

source ·
pub struct User {
    pub id: UserID,
    pub username: String,
    pub roles: Roles,
    pub prefs: UserSettings,
    pub picture: Option<i64>,
}

Fields§

§id: UserID§username: String§roles: Roles§prefs: UserSettings§picture: Option<i64>

Implementations§

Method gets all entries from the table users.

Method gets one entry from the table users based on the username supplied and password.

Arguments
  • uname - username we wish to target and delete
  • pw_hash - hash of the password for the user we are trying to access

Method gets users password from the table users based on the user

Arguments
  • conn - DBTransaction

Method deletes a entry from the table users and returns the number of rows deleted. NOTE: Return should always be 1

Arguments
  • uname - username we wish to target and delete

Method resets the password for a user to a new password.

Arguments
  • & - db &ection
  • password - new password.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more