Skip to main content

FactorKind

Enum FactorKind 

Source
#[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

Source§

fn into_assignment(self) -> Assignment<FactorKind>

Convert into an Assignment<T> value.
Source§

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for FactorKind

Source§

impl Debug for FactorKind

Source§

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

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

impl Embed for FactorKind

Source§

fn id() -> ModelId

Unique identifier for this embedded type within the schema. Read more
Source§

fn schema() -> Model

Returns the schema definition for this embedded type.
Source§

fn path_root() -> Path<Self, Self>
where Self: Sized,

An identity Path rooted at this embedded type. Read more
Source§

fn path_field<U>(index: usize) -> Path<Self, U>
where Self: Sized,

A Path from this embedded type to the field at index.
Source§

impl Eq for FactorKind

Source§

impl Field for FactorKind

Source§

type ExprTarget = FactorKind

The expression-level type of this field. Read more
Source§

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>

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> = ()

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

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>

Build a field path from a raw path of the field’s Self::ExprTarget. Read more
Source§

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>

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

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>

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

fn register(model_set: &mut ModelSet)

Register any models referenced by this field type into the given ModelSet. Read more
Source§

const NULLABLE: bool = false

Whether or not the type is nullable
Source§

const DEFERRED: bool = false

Whether this field is omitted from default loads.
Source§

impl IndexableField for FactorKind

Source§

impl IntoExpr<FactorKind> for FactorKind

Source§

fn into_expr(self) -> Expr<FactorKind>

Consume self and produce an Expr<T>. Read more
Source§

fn by_ref(&self) -> Expr<FactorKind>

Produce an Expr<T> from a reference without consuming self. Read more
Source§

impl Load for FactorKind

Source§

type Output = FactorKind

The concrete type produced by load. Read more
Source§

fn ty() -> Type

Returns the stmt::Type that describes values of this type.
Source§

fn load(value: Value) -> Result<Self>

Deserialize a database Value into Self::Output. Read more
Source§

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

Returns the stmt::Type used when this type appears as a relation target. The default delegates to ty().
Source§

fn load_relation(value: Value) -> Result<Self::Output, Error>

Deserialize a value that was loaded as a relation target. Read more
Source§

impl PartialEq for FactorKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Scalar for FactorKind

Source§

impl StructuralPartialEq for FactorKind

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> AnyEq for T
where T: Any + PartialEq,

Source§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Assign<Arc<T>> for T
where T: IntoExpr<T>,

Source§

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,

Record one or more assignments into the given [Assignments] map at the specified projection.
Source§

impl<T> Assign<Box<T>> for T
where T: IntoExpr<T>,

Source§

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,

Record one or more assignments into the given [Assignments] map at the specified projection.
Source§

impl<T> Assign<Option<T>> for T
where T: IntoExpr<T>,

Source§

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,

Record one or more assignments into the given [Assignments] map at the specified projection.
Source§

impl<T> Assign<Rc<T>> for T
where T: IntoExpr<T>,

Source§

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,

Record one or more assignments into the given [Assignments] map at the specified projection.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneAny for T
where T: Any + Clone,

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

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

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

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> IntoExpr<Arc<T>> for T
where T: IntoExpr<T>,

Source§

fn into_expr(self) -> Expr<Arc<T>>

Consume self and produce an Expr<T>. Read more
Source§

fn by_ref(&self) -> Expr<Arc<T>>

Produce an Expr<T> from a reference without consuming self. Read more
Source§

impl<T> IntoExpr<Box<T>> for T
where T: IntoExpr<T>,

Source§

fn into_expr(self) -> Expr<Box<T>>

Consume self and produce an Expr<T>. Read more
Source§

fn by_ref(&self) -> Expr<Box<T>>

Produce an Expr<T> from a reference without consuming self. Read more
Source§

impl<T> IntoExpr<Option<T>> for T
where T: IntoExpr<T>,

Source§

fn into_expr(self) -> Expr<Option<T>>

Consume self and produce an Expr<T>. Read more
Source§

fn by_ref(&self) -> Expr<Option<T>>

Produce an Expr<T> from a reference without consuming self. Read more
Source§

impl<T> IntoExpr<Rc<T>> for T
where T: IntoExpr<T>,

Source§

fn into_expr(self) -> Expr<Rc<T>>

Consume self and produce an Expr<T>. Read more
Source§

fn by_ref(&self) -> Expr<Rc<T>>

Produce an Expr<T> from a reference without consuming self. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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