pub struct User {Show 16 fields
pub id: u64,
pub status: Option<u64>,
pub login: String,
pub admin: bool,
pub firstname: String,
pub lastname: String,
pub mail: Option<String>,
pub api_key: Option<String>,
pub twofa_scheme: Option<String>,
pub created_on: OffsetDateTime,
pub updated_on: OffsetDateTime,
pub passwd_changed_on: Option<OffsetDateTime>,
pub last_login_on: Option<OffsetDateTime>,
pub custom_fields: Option<Vec<CustomFieldEssentialsWithValue>>,
pub groups: Option<Vec<GroupEssentials>>,
pub memberships: Option<Vec<UserProjectMembership>>,
/* private fields */
}
Expand description
a type for user to use as an API return type
alternatively you can use your own type limited to the fields you need
Fields§
§id: u64
numeric id
status: Option<u64>
user status (seemingly numeric here, unlike filters)
TODO: turn this into the Enum UserStatus?
login: String
login name
admin: bool
is this user an admin
firstname: String
user’s firstname
lastname: String
user’s lastname
mail: Option<String>
primary email of the user
api_key: Option<String>
the user’s API key
twofa_scheme: Option<String>
user’s 2FA scheme
created_on: OffsetDateTime
The time when this user was created
updated_on: OffsetDateTime
The time when this user was last updated
passwd_changed_on: Option<OffsetDateTime>
The time when this user’s password was last changed
last_login_on: Option<OffsetDateTime>
the time when this user last logged in
custom_fields: Option<Vec<CustomFieldEssentialsWithValue>>
custom fields with values
groups: Option<Vec<GroupEssentials>>
groups (only if include is specified)
memberships: Option<Vec<UserProjectMembership>>
memberships (only if include is specified)
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
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