# Struct docserver::defs::user::User

source ·

    pub struct User {Show 17 fields
        pub id: i64,
        pub name: String,
        pub fullname: String,
        pub email: String,
        pub description: String,
        pub password: String,
        pub otp_enabled: bool,
        pub otp_verified: bool,
        pub otp_base32: String,
        pub otp_auth_url: String,
        pub otp_defs: String,
        pub roles: String,
        pub created: String,
        pub lastaccess: String,
        pub status: UserStatus,
        pub items: String,
        pub isadmin: bool,
    }

## Fields§

§ `id: i64` § `name: String` § `fullname: String` § `email: String` § `description: String` § `password: String` § `otp_enabled: bool` § `otp_verified: bool` § `otp_base32: String` § `otp_auth_url: String` § `otp_defs: String` § `roles: String` § `created: String` § `lastaccess: String` § `status: UserStatus` § `items: String` § `isadmin: bool`

## Implementations§

source §

### impl User

source

#### pub async fn add(self, store: &UserStore) -> Result<i64>

source

#### pub async fn select( field: &str, value: &str, human: bool, store: &UserStore ) -> Result<Self>

source

#### pub async fn delete(id: i64, store: &UserStore) -> Result<bool>

source

#### pub async fn update(self, store: &UserStore) -> Result<bool>

source

#### pub fn show(&self, sep: &str)

source

#### pub async fn list( store: &UserStore, human: bool, show: bool, sep: &str ) -> Result<Vec<User>>

source

#### pub async fn count(store: &UserStore) -> Result<i64>

source

#### fn line_format(self) -> String

source

#### pub fn hash_items(items: &str) -> HashMap<String, String>

source

#### pub fn items(&self) -> HashMap<String, String>

source

#### pub fn json_items(items: HashMap<String, String>) -> String

source

#### pub fn from_data(&mut self, user_data: UserData)

source

#### pub fn disable_totp(&mut self)

source

#### pub fn from_user(&mut self, new_user: User)

source

#### pub fn session_data(&self) -> String

source

#### pub fn estimate_password(word: &str) -> String

source

#### pub fn password_score(word: &str) -> u8

## Trait Implementations§

source §

### impl Clone for User

source §

#### fn clone(&self) -> User

Returns a copy of the value. Read more
1.0.0 · source §

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more
source §

### impl Debug for User

source §

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source §

### impl Default for User

source §

#### fn default() -> User

Returns the “default value” for a type. Read more
source §

### impl<'de> Deserialize<'de> for User

source §

#### 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 Display for User

source §

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source §

### impl Entry for User

source §

#### fn from_line(line: &str) -> Result<User, ParseIntError>

source §

### impl PartialEq<User> for User

source §

#### fn eq(&self, other: &User) -> bool

This method tests for `self` and `other` values to be equal, and is used by `==`.
1.0.0 · source §

#### fn ne(&self, other: &Rhs) -> bool

This method tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source §

### impl PartialOrd<User> for User

source §

#### fn partial_cmp(&self, other: &User) -> Option<Ordering>

This method returns an ordering between `self` and `other` values if one exists. Read more
1.0.0 · source §

#### fn lt(&self, other: &Rhs) -> bool

This method tests less than (for `self` and `other`) and is used by the `<` operator. Read more
1.0.0 · source §

#### fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator. Read more
1.0.0 · source §

#### fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for `self` and `other`) and is used by the `>` operator. Read more
1.0.0 · source §

#### fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator. Read more
source §

### impl Serialize for User

source §

#### fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source §

### impl StructuralPartialEq for User

## Auto Trait Implementations§

§

### impl RefUnwindSafe for User

§

### impl Send for User

§

### impl Sync for User

§

### impl Unpin for User

§

### impl UnwindSafe for User

## Blanket Implementations§

source §

### impl<T> Any for Twhere T: 'static + ?Sized,

source §

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
source §

### impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source §

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source §

### impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source §

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source §

### impl<T> From<T> for T

const: unstable · source §

#### fn from(t: T) -> T

Returns the argument unchanged.

§

### impl<T> FromRef<T> for Twhere T: Clone,

§

#### fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

### impl<T> FromRef<T> for Twhere T: Clone,

§

#### fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source §

### impl<T> Instrument for T

source §

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided `Span`, returning an `Instrumented` wrapper. Read more
source §

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
source §

### impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source §

#### fn into(self) -> U

Calls `U::from(self)`.

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

source §

### impl<T> Same<T> for T

§

#### type Output = T

Should always be `Self`
source §

### impl<T> ToOwned for Twhere T: Clone,

§

#### type Owned = T

The resulting type after obtaining ownership.
source §

#### fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source §

#### fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source §

### impl<T> ToString for Twhere T: Display + ?Sized,

source §

#### default fn to_string(&self) -> String

Converts the given value to a `String`. Read more
source §

### impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

#### type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source §

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source §

### impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source §

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

### impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

#### fn vzip(self) -> V

source §

### impl<T> WithSubscriber for T

source §

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
source §

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
source §

### impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

§

### impl<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,