Struct UserSchema

Source
pub struct UserSchema {
Show 25 fields pub id: Uuid, pub aud: String, pub role: String, pub email: Option<String>, pub email_confirmed_at: Option<OffsetDateTime>, pub invited_at: Option<OffsetDateTime>, pub phone: Option<String>, pub phone_confirmed_at: Option<OffsetDateTime>, pub confirmation_sent_at: Option<OffsetDateTime>, pub confirmed_at: Option<OffsetDateTime>, pub recovery_sent_at: Option<OffsetDateTime>, pub new_email: Option<String>, pub email_change_sent_at: Option<OffsetDateTime>, pub new_phone: Option<String>, pub phone_change_sent_at: Option<OffsetDateTime>, pub reauthentication_sent_at: Option<OffsetDateTime>, pub last_sign_in_at: Option<OffsetDateTime>, pub user_metadata: Option<HashMap<String, Value>>, pub app_metadata: Option<HashMap<String, Value>>, pub factors: Vec<MFAFactorSchema>, pub identities: Option<Vec<HashMap<String, Value>>>, pub banned_until: Option<OffsetDateTime>, pub created_at: Option<OffsetDateTime>, pub deleted_at: Option<OffsetDateTime>, pub updated_at: Option<OffsetDateTime>,
}
Expand description

Represents a user in the Supabase Auth system

This struct contains all the information about a user including their authentication status, contact information, and metadata.

Fields§

§id: Uuid

Unique identifier for the user

§aud: String

Audience claim for JWT (typically the API URL)

§role: String

User’s role in the system (e.g., “authenticated”)

§email: Option<String>

User’s primary contact email. In most cases you can uniquely identify a user by their email address, but not in all cases.

§email_confirmed_at: Option<OffsetDateTime>

Timestamp when the email was confirmed

§invited_at: Option<OffsetDateTime>

Timestamp when the user was invited

§phone: Option<String>

User’s primary contact phone number. In most cases you can uniquely identify a user by their phone number, but not in all cases.

§phone_confirmed_at: Option<OffsetDateTime>

Timestamp when the phone number was confirmed

§confirmation_sent_at: Option<OffsetDateTime>

Timestamp when confirmation email/SMS was sent

§confirmed_at: Option<OffsetDateTime>

Timestamp when the user confirmed their account

§recovery_sent_at: Option<OffsetDateTime>

Timestamp when password recovery email was sent

§new_email: Option<String>

Pending new email address (awaiting confirmation)

§email_change_sent_at: Option<OffsetDateTime>

Timestamp when email change confirmation was sent

§new_phone: Option<String>

Pending new phone number (awaiting confirmation)

§phone_change_sent_at: Option<OffsetDateTime>

Timestamp when phone change confirmation was sent

§reauthentication_sent_at: Option<OffsetDateTime>

Timestamp when reauthentication request was sent

§last_sign_in_at: Option<OffsetDateTime>

Timestamp of the user’s last sign in

§user_metadata: Option<HashMap<String, Value>>

Custom user metadata that can be updated by the user

§app_metadata: Option<HashMap<String, Value>>

Custom app metadata that can only be updated by service role

§factors: Vec<MFAFactorSchema>

Multi-factor authentication factors

§identities: Option<Vec<HashMap<String, Value>>>

OAuth/social login identities linked to this user

§banned_until: Option<OffsetDateTime>

Timestamp until which the user is banned

§created_at: Option<OffsetDateTime>

Timestamp when the user was created

§deleted_at: Option<OffsetDateTime>

Timestamp when the user was soft deleted

§updated_at: Option<OffsetDateTime>

Timestamp when the user was last updated

Trait Implementations§

Source§

impl Clone for UserSchema

Source§

fn clone(&self) -> UserSchema

Returns a duplicate of the value. Read more
1.0.0 · Source§

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 Default for UserSchema

Source§

fn default() -> UserSchema

Returns the “default value” for a type. 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 PartialEq for UserSchema

Source§

fn eq(&self, other: &UserSchema) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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
Source§

impl Eq for UserSchema

Source§

impl StructuralPartialEq for UserSchema

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

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
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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,