#[non_exhaustive]pub enum FactorKind {
Authenticator,
RecoveryCode,
EmailCode,
}Expand description
What an AuthFactor is. Stored as its snake_case name in a text column, so a kind 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.
Authenticator
An authenticator app’s RFC 6238 secret.
RecoveryCode
A single-use recovery code, for an account that lost its authenticator.
EmailCode
Codes mailed to the account’s address, one per sign-in; the row holds no secret.
Trait Implementations§
Source§impl Assign<FactorKind> for FactorKind
impl Assign<FactorKind> for FactorKind
Source§fn into_assignment(self) -> Assignment<FactorKind>
fn into_assignment(self) -> Assignment<FactorKind>
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 FactorKind
impl Clone for FactorKind
impl Copy for FactorKind
Source§impl Debug for FactorKind
impl Debug for FactorKind
impl Eq for FactorKind
Source§impl Field for FactorKind
impl Field for FactorKind
Source§type ExprTarget = FactorKind
type ExprTarget = FactorKind
The expression-level type of this field. Read more
Source§type Path<__Origin> = FactorKindFields<__Origin>
type Path<__Origin> = FactorKindFields<__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> = FactorKindListFields<__Origin>
type ListPath<__Origin> = FactorKindListFields<__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 = FactorKind
type Inner = FactorKind
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 FactorKind
Source§impl IntoExpr<FactorKind> for FactorKind
impl IntoExpr<FactorKind> for FactorKind
Source§impl Load for FactorKind
impl Load for FactorKind
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 FactorKind
impl PartialEq for FactorKind
impl Scalar for FactorKind
impl StructuralPartialEq for FactorKind
Auto Trait Implementations§
impl Freeze for FactorKind
impl RefUnwindSafe for FactorKind
impl Send for FactorKind
impl Sync for FactorKind
impl Unpin for FactorKind
impl UnsafeUnpin for FactorKind
impl UnwindSafe for FactorKind
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.