User

Struct User 

Source
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§

Trait Implementations§

Source§

impl Described<ElasticMeta> for User

Source§

fn metadata() -> Descriptor<ElasticMeta>

Get self description of this type
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 Readable for User

Source§

fn set_from_archive(&mut self, _from_archive: bool)

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

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,