pub struct UserSelf {
pub pk: i32,
pub username: String,
pub name: String,
pub is_active: bool,
pub is_superuser: bool,
pub groups: Vec<UserSelfGroups>,
pub email: Option<String>,
pub avatar: String,
pub uid: String,
pub settings: HashMap<String, Value>,
pub type: Option<UserTypeEnum>,
pub system_permissions: Vec<String>,
}
Expand description
UserSelf : User Serializer for information a user can retrieve about themselves
Fields§
§pk: i32
§username: String
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
name: String
User’s display name.
is_active: bool
Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_superuser: bool
§groups: Vec<UserSelfGroups>
§email: Option<String>
§avatar: String
User’s avatar, either a http/https URL or a data URI
uid: String
§settings: HashMap<String, Value>
Get user settings with brand and group settings applied
type: Option<UserTypeEnum>
§system_permissions: Vec<String>
Get all system permissions assigned to the user
Implementations§
Source§impl UserSelf
impl UserSelf
Sourcepub fn new(
pk: i32,
username: String,
name: String,
is_active: bool,
is_superuser: bool,
groups: Vec<UserSelfGroups>,
avatar: String,
uid: String,
settings: HashMap<String, Value>,
system_permissions: Vec<String>,
) -> UserSelf
pub fn new( pk: i32, username: String, name: String, is_active: bool, is_superuser: bool, groups: Vec<UserSelfGroups>, avatar: String, uid: String, settings: HashMap<String, Value>, system_permissions: Vec<String>, ) -> UserSelf
User Serializer for information a user can retrieve about themselves
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserSelf
impl<'de> Deserialize<'de> for UserSelf
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
impl StructuralPartialEq for UserSelf
Auto Trait Implementations§
impl Freeze for UserSelf
impl RefUnwindSafe for UserSelf
impl Send for UserSelf
impl Sync for UserSelf
impl Unpin for UserSelf
impl UnwindSafe for UserSelf
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