UserSchema

Struct UserSchema 

Source
pub struct UserSchema {
Show 25 fields pub id: Option<String>, pub aud: Option<String>, pub role: Option<String>, pub email: Option<String>, pub email_confirmed_at: Option<DateTime<Utc>>, pub phone: Option<String>, pub phone_confirmed_at: Option<DateTime<Utc>>, pub confirmation_sent_at: Option<DateTime<Utc>>, pub confirmed_at: Option<DateTime<Utc>>, pub recovery_sent_at: Option<DateTime<Utc>>, pub new_email: Option<String>, pub email_change_sent_at: Option<DateTime<Utc>>, pub new_phone: Option<String>, pub phone_change_sent_at: Option<DateTime<Utc>>, pub reauthentication_sent_at: Option<DateTime<Utc>>, pub last_sign_in_at: Option<DateTime<Utc>>, pub app_metadata: Option<OwnedValue>, pub user_metadata: Option<OwnedValue>, pub factors: Option<Vec<MFAFactorSchema>>, pub identities: Option<Vec<IdentitySchema>>, pub banned_until: Option<DateTime<Utc>>, pub created_at: Option<DateTime<Utc>>, pub updated_at: Option<DateTime<Utc>>, pub deleted_at: Option<DateTime<Utc>>, pub is_anonymous: Option<bool>,
}
Expand description

Object describing the user related to the issued access and refresh tokens.

Fields§

§id: Option<String>

User ID.

§aud: Option<String>

Deprecated.

§role: Option<String>

Role.

§email: Option<String>

User’s primary contact email.

§email_confirmed_at: Option<DateTime<Utc>>

Timestamp when the email was confirmed.

§phone: Option<String>

User’s primary contact phone number.

§phone_confirmed_at: Option<DateTime<Utc>>

Timestamp when the phone number was confirmed.

§confirmation_sent_at: Option<DateTime<Utc>>

Timestamp when the confirmation was sent.

§confirmed_at: Option<DateTime<Utc>>

Timestamp when the user was confirmed.

§recovery_sent_at: Option<DateTime<Utc>>

Timestamp when the recovery email was sent.

§new_email: Option<String>

New email address if the user is changing it.

§email_change_sent_at: Option<DateTime<Utc>>

Timestamp when the email change was sent.

§new_phone: Option<String>

New phone number if the user is changing it.

§phone_change_sent_at: Option<DateTime<Utc>>

Timestamp when the phone change was sent.

§reauthentication_sent_at: Option<DateTime<Utc>>

Timestamp when reauthentication was sent.

§last_sign_in_at: Option<DateTime<Utc>>

Timestamp of the last sign-in.

§app_metadata: Option<OwnedValue>

Application-specific metadata.

§user_metadata: Option<OwnedValue>

User-specific metadata.

§factors: Option<Vec<MFAFactorSchema>>

Multi-factor authentication factors.

§identities: Option<Vec<IdentitySchema>>

External identities linked to the user.

§banned_until: Option<DateTime<Utc>>

Timestamp until which the user is banned.

§created_at: Option<DateTime<Utc>>

Timestamp when the user was created.

§updated_at: Option<DateTime<Utc>>

Timestamp when the user was last updated.

§deleted_at: Option<DateTime<Utc>>

Timestamp when the user was deleted.

§is_anonymous: Option<bool>

Indicates if the user is anonymous.

Implementations§

Source§

impl UserSchema

Source

pub fn builder() -> UserSchemaBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building UserSchema. On the builder, call .id(...)(optional), .aud(...)(optional), .role(...)(optional), .email(...)(optional), .email_confirmed_at(...)(optional), .phone(...)(optional), .phone_confirmed_at(...)(optional), .confirmation_sent_at(...)(optional), .confirmed_at(...)(optional), .recovery_sent_at(...)(optional), .new_email(...)(optional), .email_change_sent_at(...)(optional), .new_phone(...)(optional), .phone_change_sent_at(...)(optional), .reauthentication_sent_at(...)(optional), .last_sign_in_at(...)(optional), .app_metadata(...)(optional), .user_metadata(...)(optional), .factors(...)(optional), .identities(...)(optional), .banned_until(...)(optional), .created_at(...)(optional), .updated_at(...)(optional), .deleted_at(...)(optional), .is_anonymous(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of UserSchema.

Trait Implementations§

Source§

impl Clone for UserSchema

Source§

fn clone(&self) -> UserSchema

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UserSchema

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for UserSchema

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for UserSchema

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,