pub struct ScimUser {
pub id: Option<String>,
pub user_name: String,
pub active: bool,
pub name: Option<ScimName>,
pub emails: Vec<ScimEmail>,
pub display_name: Option<String>,
pub schemas: Vec<String>,
}Expand description
SCIM User schema (subset). Most IdPs send a much fuller object
— pylon ignores anything we don’t model. extra captures it
for round-trip on PATCH.
Fields§
§id: Option<String>SCIM “id” — the IdP-assigned identifier. Pylon uses its own
User row id internally and stores SCIM id as scimId.
user_name: StringUniversal SCIM identifier — typically the email.
active: boolWhether the IdP considers this user active. false is the
soft-delete signal.
name: Option<ScimName>§emails: Vec<ScimEmail>First email is treated as primary if primary flag missing.
display_name: Option<String>§schemas: Vec<String>SCIM schemas array — must include at least
urn:ietf:params:scim:schemas:core:2.0:User.
Implementations§
Source§impl ScimUser
impl ScimUser
Sourcepub fn primary_email(&self) -> &str
pub fn primary_email(&self) -> &str
Pull the primary email — primary=true first, else the first
element, else fall back to userName.
Sourcepub fn pretty_display_name(&self) -> String
pub fn pretty_display_name(&self) -> String
Best-effort display name — displayName first, else
name.formatted, else <given> <family>.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ScimUser
impl<'de> Deserialize<'de> for ScimUser
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 ScimUser
impl RefUnwindSafe for ScimUser
impl Send for ScimUser
impl Sync for ScimUser
impl Unpin for ScimUser
impl UnsafeUnpin for ScimUser
impl UnwindSafe for ScimUser
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