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
sourceimpl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
sourcefn 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 RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more