pub struct UserView {Show 21 fields
pub id: String,
pub name: Option<String>,
pub email: Option<String>,
pub email_verified: bool,
pub image: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub username: Option<String>,
pub display_username: Option<String>,
pub two_factor_enabled: Option<bool>,
pub role: Option<String>,
pub banned: Option<bool>,
pub ban_reason: Option<String>,
pub ban_expires: Option<DateTime<Utc>>,
pub is_anonymous: Option<bool>,
pub phone_number: Option<String>,
pub phone_number_verified: Option<bool>,
pub last_login_method: Option<String>,
pub extension_fields: BTreeMap<String, Value>,
pub metadata: Value,
pub omitted_fields: BTreeSet<String>,
}Expand description
Public user response shape.
Fields§
§id: String§name: Option<String>§email: Option<String>§email_verified: bool§image: Option<String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§username: Option<String>§display_username: Option<String>§two_factor_enabled: Option<bool>§role: Option<String>§banned: Option<bool>§ban_reason: Option<String>§ban_expires: Option<DateTime<Utc>>§is_anonymous: Option<bool>§phone_number: Option<String>§phone_number_verified: Option<bool>§last_login_method: Option<String>§extension_fields: BTreeMap<String, Value>Nullable fields contributed by an enabled plugin’s output schema.
metadata: Value§omitted_fields: BTreeSet<String>Fields absent from an authenticated cache projection.
Trait Implementations§
Source§impl AuthUser for UserView
impl AuthUser for UserView
Source§fn retained_user_view(&self) -> Option<&UserView>
fn retained_user_view(&self) -> Option<&UserView>
A chosen authenticated view is already projected and must remain exact.
Source§fn additional_fields(&self) -> FieldOutput
fn additional_fields(&self) -> FieldOutput
Physical application/plugin values; public policy is applied separately.
fn id(&self) -> Cow<'_, str>
fn email(&self) -> Option<&str>
fn name(&self) -> Option<&str>
fn email_verified(&self) -> bool
fn image(&self) -> Option<&str>
fn created_at(&self) -> DateTime<Utc>
fn updated_at(&self) -> DateTime<Utc>
fn username(&self) -> Option<&str>
fn display_username(&self) -> Option<&str>
fn two_factor_enabled(&self) -> bool
Source§fn two_factor_enabled_value(&self) -> Option<bool>
fn two_factor_enabled_value(&self) -> Option<bool>
Persisted plugin state.
None preserves an absent or unset field.fn role(&self) -> Option<&str>
fn banned(&self) -> bool
Source§fn banned_value(&self) -> Option<bool>
fn banned_value(&self) -> Option<bool>
Persisted plugin state.
None preserves an absent or unset field.fn ban_reason(&self) -> Option<&str>
fn ban_expires(&self) -> Option<DateTime<Utc>>
Source§fn is_anonymous(&self) -> Option<bool>
fn is_anonymous(&self) -> Option<bool>
Anonymous-plugin state;
None means the field is absent or unset.fn phone_number(&self) -> Option<&str>
fn phone_number_verified(&self) -> Option<bool>
fn last_login_method(&self) -> Option<&str>
fn metadata(&self) -> &Value
Source§fn secondary_snapshot(&self) -> AuthResult<Value>
fn secondary_snapshot(&self) -> AuthResult<Value>
Encode the complete typed model for a trusted secondary backend.
Custom entities can opt in without adding a Deserialize bound to all schemas.
Source§fn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self>
fn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self>
Restore a model from a trusted secondary backend, before public projection.
Source§fn adapter_snapshot(&self) -> Option<&AdapterOutput>
fn adapter_snapshot(&self) -> Option<&AdapterOutput>
A genuine retained adapter result, including declared undefined values.
Source§impl<'de> Deserialize<'de> for UserView
impl<'de> Deserialize<'de> for UserView
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 Eq for UserView
impl StructuralPartialEq for UserView
Auto Trait Implementations§
impl Freeze for UserView
impl RefUnwindSafe for UserView
impl Send for UserView
impl Sync for UserView
impl Unpin for UserView
impl UnsafeUnpin for UserView
impl UnwindSafe for UserView
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.