pub struct UserInfo {
pub id: UserId,
pub login: Option<String>,
pub email: Option<String>,
pub role: Role,
pub access: Access,
pub method: Method,
pub has_password: bool,
pub created_at: Timestamp,
pub impersonated_by: Option<Impersonator>,
}Available on crate feature
alloc only.Expand description
What the frontend and the admin pages see of a user.
Fields§
§id: UserIdThe user’s id.
login: Option<String>The unique login name, if the user has one.
email: Option<String>The unique, normalized email, if the user has one.
role: RoleThe user’s role.
access: AccessThe user’s account state.
method: MethodThe user’s stored credential.
has_password: boolWhether a password is set.
created_at: TimestampWhen the user was created.
impersonated_by: Option<Impersonator>The admin acting as this user, when this is the signed-in user of a
session an admin created by impersonating them. Only the answers about
the request’s own user (GET /api/auth/me, sign-in, impersonation and
the account routes) set it; it is absent from JSON when None.
Implementations§
Trait Implementations§
Source§impl<'__de, __A> Decode<'__de, Binary, __A> for UserInfowhere
__A: Allocator,
Available on crate feature musli02 only.
impl<'__de, __A> Decode<'__de, Binary, __A> for UserInfowhere
__A: Allocator,
Available on crate feature
musli02 only.Source§const IS_BITWISE_DECODE: bool = false
const IS_BITWISE_DECODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl<'__de, __A> Decode<'__de, Text, __A> for UserInfowhere
__A: Allocator,
Available on crate feature musli02 only.
impl<'__de, __A> Decode<'__de, Text, __A> for UserInfowhere
__A: Allocator,
Available on crate feature
musli02 only.Source§const IS_BITWISE_DECODE: bool = false
const IS_BITWISE_DECODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl<'de> Deserialize<'de> for UserInfo
impl<'de> Deserialize<'de> for UserInfo
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 Encode<Binary> for UserInfo
Available on crate feature musli02 only.
impl Encode<Binary> for UserInfo
Available on crate feature
musli02 only.Source§const IS_BITWISE_ENCODE: bool = false
const IS_BITWISE_ENCODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl Encode<Text> for UserInfo
Available on crate feature musli02 only.
impl Encode<Text> for UserInfo
Available on crate feature
musli02 only.Source§const IS_BITWISE_ENCODE: bool = false
const IS_BITWISE_ENCODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
impl Eq for UserInfo
impl StructuralPartialEq for UserInfo
Auto Trait Implementations§
impl Freeze for UserInfo
impl RefUnwindSafe for UserInfo
impl Send for UserInfo
impl Sync for UserInfo
impl Unpin for UserInfo
impl UnsafeUnpin for UserInfo
impl UnwindSafe for UserInfo
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