#[non_exhaustive]pub enum TokenPurpose {
PasswordReset,
EmailVerification,
EmailChange,
EmailChangeCancel,
TwoFactorChallenge,
TwoFactorEmailCode,
}Expand description
What an AuthToken does when used. Stored as its snake_case name in a text column, so a
purpose a later release adds needs no migration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PasswordReset
A mailed link that sets a new password.
EmailVerification
A mailed link that proves the account reads the address it was mailed to.
EmailChange
A link mailed to a new address that makes it the account’s.
EmailChangeCancel
A link mailed to the old address that cancels a pending change.
TwoFactorChallenge
A sign-in whose password verified, waiting for its second factor.
TwoFactorEmailCode
A code mailed as a second factor, to sign in or to set the factor up.
Trait Implementations§
Source§impl Assign<TokenPurpose> for TokenPurpose
impl Assign<TokenPurpose> for TokenPurpose
Source§fn into_assignment(self) -> Assignment<TokenPurpose>
fn into_assignment(self) -> Assignment<TokenPurpose>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl Clone for TokenPurpose
impl Clone for TokenPurpose
impl Copy for TokenPurpose
Source§impl Debug for TokenPurpose
impl Debug for TokenPurpose
impl Eq for TokenPurpose
Source§impl Field for TokenPurpose
impl Field for TokenPurpose
Source§type ExprTarget = TokenPurpose
type ExprTarget = TokenPurpose
The expression-level type of this field. Read more
Source§type Path<__Origin> = TokenPurposeFields<__Origin>
type Path<__Origin> = TokenPurposeFields<__Origin>
The type returned when accessing this field from a Fields struct.
For primitives, this is Path<Origin, Self>.
For embedded types, this is {Type}Fields.
Source§type ListPath<__Origin> = TokenPurposeListFields<__Origin>
type ListPath<__Origin> = TokenPurposeListFields<__Origin>
The type returned when accessing this field from a list Fields struct.
For primitives, this is Path<Origin, ListSelf::ExprTarget>.
For embedded types, this is {Type}ListFields.
Source§type Update<'a> = ()
type Update<'a> = ()
The type of the update builder for this field.
For embedded types, this is {Type}Update<’a>.
For primitives, this will be {Type}Update<’a> once implemented.
Source§type Inner = TokenPurpose
type Inner = TokenPurpose
The unwrapped type used for foreign key filter expressions.
Primitives map to themselves. Wrappers like
Option<T>, Box<T>,
Arc<T>, and Rc<T> map to T::Inner.Source§fn new_path<__Origin>(path: Path<__Origin, Self>) -> Self::Path<__Origin>
fn new_path<__Origin>(path: Path<__Origin, Self>) -> Self::Path<__Origin>
Build a field path from a raw path of the field’s
Self::ExprTarget. Read moreSource§fn new_list_path<__Origin>(
path: Path<__Origin, List<Self::ExprTarget>>,
) -> Self::ListPath<__Origin>
fn new_list_path<__Origin>( path: Path<__Origin, List<Self::ExprTarget>>, ) -> Self::ListPath<__Origin>
Build a list field path from a raw path.
For primitives, returns the path as-is.
For embedded types, wraps the path in a ListFields struct.
Source§fn new_update<'a>(
_assignments: &'a mut Assignments,
_projection: Projection,
) -> Self::Update<'a>
fn new_update<'a>( _assignments: &'a mut Assignments, _projection: Projection, ) -> Self::Update<'a>
Build an update builder from assignments and a projection.
For primitives, this returns
() (no builder).
For embedded types, this is overridden to construct the {Type}Update builder.Source§fn field_ty(storage_ty: Option<Type>) -> FieldTy
fn field_ty(storage_ty: Option<Type>) -> FieldTy
Returns the app-level field type for this primitive.
Default implementation returns a Primitive field type.
Embedded types override this to return Embedded field type.
Source§fn key_constraint<__Origin>(
&self,
target: Path<__Origin, Self::Inner>,
) -> Expr<bool>
fn key_constraint<__Origin>( &self, target: Path<__Origin, Self::Inner>, ) -> Expr<bool>
Build a boolean filter expression comparing this field value against
a target path. Used by generated belongs-to accessors to build FK
lookups. Read more
impl IndexableField for TokenPurpose
Source§impl IntoExpr<TokenPurpose> for TokenPurpose
impl IntoExpr<TokenPurpose> for TokenPurpose
Source§impl Load for TokenPurpose
impl Load for TokenPurpose
Source§fn ty() -> Type
fn ty() -> Type
Returns the
stmt::Type that describes values of this type.Source§fn reload(target: &mut Self, value: Value) -> Result<()>
fn reload(target: &mut Self, value: Value) -> Result<()>
Reload the value in-place from a value returned by the database. Read more
Source§fn ty_relation() -> Type
fn ty_relation() -> Type
Returns the
stmt::Type used when this type appears as a relation
target. The default delegates to ty().Source§impl PartialEq for TokenPurpose
impl PartialEq for TokenPurpose
impl Scalar for TokenPurpose
impl StructuralPartialEq for TokenPurpose
Auto Trait Implementations§
impl Freeze for TokenPurpose
impl RefUnwindSafe for TokenPurpose
impl Send for TokenPurpose
impl Sync for TokenPurpose
impl Unpin for TokenPurpose
impl UnsafeUnpin for TokenPurpose
impl UnwindSafe for TokenPurpose
Blanket Implementations§
Source§impl<T> Assign<Arc<T>> for Twhere
T: IntoExpr<T>,
impl<T> Assign<Arc<T>> for Twhere
T: IntoExpr<T>,
Source§fn into_assignment(self) -> Assignment<Arc<T>>
fn into_assignment(self) -> Assignment<Arc<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T> Assign<Box<T>> for Twhere
T: IntoExpr<T>,
impl<T> Assign<Box<T>> for Twhere
T: IntoExpr<T>,
Source§fn into_assignment(self) -> Assignment<Box<T>>
fn into_assignment(self) -> Assignment<Box<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T> Assign<Option<T>> for Twhere
T: IntoExpr<T>,
impl<T> Assign<Option<T>> for Twhere
T: IntoExpr<T>,
Source§fn into_assignment(self) -> Assignment<Option<T>>
fn into_assignment(self) -> Assignment<Option<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T> Assign<Rc<T>> for Twhere
T: IntoExpr<T>,
impl<T> Assign<Rc<T>> for Twhere
T: IntoExpr<T>,
Source§fn into_assignment(self) -> Assignment<Rc<T>>
fn into_assignment(self) -> Assignment<Rc<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.