pub struct User {Show 21 fields
pub agrees_with_tos: Option<DateTime<Utc>>,
pub api_quota: Option<u64>,
pub api_daily_quota: Option<u64>,
pub apikeys: HashMap<String, ApiKey>,
pub apps: HashMap<String, Apps>,
pub can_impersonate: bool,
pub classification: ExpandingClassification<true>,
pub dn: Option<String>,
pub email: Option<Email>,
pub groups: Vec<UpperString>,
pub is_active: bool,
pub name: String,
pub otp_sk: Option<String>,
pub password: String,
pub submission_quota: Option<u64>,
pub submission_async_quota: Option<u64>,
pub submission_daily_quota: Option<u64>,
pub user_types: Vec<UserType>,
pub roles: Vec<UserRole>,
pub security_tokens: HashMap<String, String>,
pub uname: String,
/* private fields */
}
Expand description
Model of User
Fields§
§agrees_with_tos: Option<DateTime<Utc>>
Date the user agree with terms of service
api_quota: Option<u64>
Maximum number of concurrent API requests (0: No Quota)
api_daily_quota: Option<u64>
Maximum number of API calls a user can do daily (0: No Quota)
apikeys: HashMap<String, ApiKey>
Mapping of API keys
apps: HashMap<String, Apps>
Applications with access to the account
can_impersonate: bool
Allowed to query on behalf of others?
classification: ExpandingClassification<true>
Maximum classification for the user
dn: Option<String>
User’s LDAP DN
email: Option<Email>
User’s email address
groups: Vec<UpperString>
List of groups the user submits to
is_active: bool
Is the user active?
name: String
Full name of the user
otp_sk: Option<String>
Secret key to generate one time passwords
password: String
BCrypt hash of the user’s password
submission_quota: Option<u64>
Maximum number of concurrent submissions (0: No Quota)
submission_async_quota: Option<u64>
Maximum number of concurrent async submission (0: No Quota)
submission_daily_quota: Option<u64>
Maximum number of submissions a user can do daily (0: No Quota)
user_types: Vec<UserType>
Type of user
roles: Vec<UserRole>
Default roles for user
security_tokens: HashMap<String, String>
Map of security tokens
uname: String
Username
Implementations§
Source§impl User
impl User
pub fn create_test_user() -> Self
Trait Implementations§
Source§impl Described<ElasticMeta> for User
impl Described<ElasticMeta> for User
Source§fn metadata() -> Descriptor<ElasticMeta>
fn metadata() -> Descriptor<ElasticMeta>
Get self description of this type
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
Auto Trait Implementations§
impl Freeze for User
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> 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
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