pub struct User {
pub id: String,
pub display_name: String,
pub email: Option<String>,
pub enabled: bool,
pub quota: Quota,
pub groups: Vec<String>,
pub subadmin: Vec<String>,
pub storage_location: Option<String>,
pub backend: Option<String>,
}Expand description
Nextcloud user account details.
Decoded from the data field of user endpoints:
- Current authenticated user:
/ocs/v1.php/cloud/useror/ocs/v2.php/cloud/user - Provisioned user profile:
/ocs/v1.php/cloud/users/{userid}or/ocs/v2.php/cloud/users/{userid}
Official documentation:
Fields§
§id: StringUnique username / user identifier.
display_name: StringUser display name formatted for the user interface.
email: Option<String>Primary configured email address.
enabled: boolWhether the user account is active and enabled.
quota: QuotaStorage quota metrics and usage numbers.
groups: Vec<String>Group memberships assigned to this user.
subadmin: Vec<String>Groups for which this user has delegated administrative rights.
storage_location: Option<String>Server filesystem storage directory path.
backend: Option<String>Authentication backend powering this account (e.g. "Database" or "LDAP").
Implementations§
Source§impl User
impl User
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
User’s display name.
Sourcepub const fn is_enabled(&self) -> bool
pub const fn is_enabled(&self) -> bool
Whether this user account is active.
Sourcepub fn storage_location(&self) -> Option<&str>
pub fn storage_location(&self) -> Option<&str>
Storage location path on the server, if returned.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin 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