#[non_exhaustive]pub struct UserInfo {
pub sub: PpnumId,
pub email: Option<String>,
pub ppnum: Ppnum,
pub email_verified: Option<bool>,
pub created_at: Option<OffsetDateTime>,
pub session_version: Option<i64>,
}Expand description
User info from Ppoppo Accounts userinfo endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sub: PpnumId§email: Option<String>§ppnum: Ppnum§email_verified: Option<bool>§created_at: Option<OffsetDateTime>§session_version: Option<i64>Break-glass session_version for this account (#005 spec).
Populated by PAS for Human-entity tokens; None for AI agents and
for accounts that don’t carry a human identity. The
session_version module’s HttpUserInfoFetcher reads
this field during cache-miss fallback.
Implementations§
Source§impl UserInfo
impl UserInfo
Sourcepub fn with_email(self, email: impl Into<String>) -> Self
pub fn with_email(self, email: impl Into<String>) -> Self
Set the email.
Sourcepub fn with_email_verified(self, verified: bool) -> Self
pub fn with_email_verified(self, verified: bool) -> Self
Set the email_verified flag.
Sourcepub fn with_session_version(self, sv: i64) -> Self
pub fn with_session_version(self, sv: i64) -> Self
Set the break-glass session_version (#005).
Trait Implementations§
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
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