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: boolImplementations§
source§impl User
impl User
pub async fn add(self, store: &UserStore) -> Result<i64>
pub async fn select( field: &str, value: &str, human: bool, store: &UserStore ) -> Result<Self>
pub async fn delete(id: i64, store: &UserStore) -> Result<bool>
pub async fn update(self, store: &UserStore) -> Result<bool>
pub fn show(&self, sep: &str)
pub async fn list( store: &UserStore, human: bool, show: bool, sep: &str ) -> Result<Vec<User>>
pub async fn count(store: &UserStore) -> Result<i64>
fn line_format(self) -> String
pub fn hash_items(items: &str) -> HashMap<String, String>
pub fn items(&self) -> HashMap<String, String>
pub fn json_items(items: HashMap<String, String>) -> String
pub fn from_data(&mut self, user_data: UserData)
pub fn disable_totp(&mut self)
pub fn from_user(&mut self, new_user: User)
pub fn session_data(&self) -> String
pub fn estimate_password(word: &str) -> String
pub fn password_score(word: &str) -> u8
Trait Implementations§
source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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 PartialEq<User> for User
impl PartialEq<User> for User
source§impl PartialOrd<User> for User
impl PartialOrd<User> for User
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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