pub struct Model {
pub id: String,
pub identifier: String,
pub value: String,
pub expires_at: DateTime<Utc>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Fields§
§id: String§identifier: String§value: String§expires_at: DateTime<Utc>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Trait Implementations§
Source§impl AuthVerification for Model
impl AuthVerification for Model
impl Eq for Model
Source§impl SqlxModel for Model
impl SqlxModel for Model
Source§const COLUMN_NAMES: &'static [&'static str]
const COLUMN_NAMES: &'static [&'static str]
The names of
COLUMNS, for select and returning lists.Source§const FIELD_COLUMNS: &'static [(&'static str, &'static str)]
const FIELD_COLUMNS: &'static [(&'static str, &'static str)]
Rust field names paired with their physical columns.
Source§const PRIMARY_KEY: &'static str = "id"
const PRIMARY_KEY: &'static str = "id"
Physical primary-key column.
Source§const PROVIDER_VERIFICATION_COLUMN: Option<&'static str> = ::std::option::Option::None
const PROVIDER_VERIFICATION_COLUMN: Option<&'static str> = ::std::option::Option::None
Provider verification column whose SQLite storage may retain raw scalars.
Other model roles and handwritten models retain their existing projection.
Source§fn into_active(self) -> ActiveRow
fn into_active(self) -> ActiveRow
Every column as an unchanged value.
Source§fn from_active(active: ActiveRow) -> AuthResult<Self>
fn from_active(active: ActiveRow) -> AuthResult<Self>
Materialize a model without a database write. Omitted optional fields
become
None; other omitted fields fail. Read moreSource§fn column_value(column: &str, value: SqlValue) -> SqlValue
fn column_value(column: &str, value: SqlValue) -> SqlValue
Apply this physical column’s binding override without changing its Rust
String representation. Ordinary TEXT/VARCHAR columns remain unchanged.
Source§fn timestamp_value(column: &str, value: DateTime<Utc>) -> SqlValue
fn timestamp_value(column: &str, value: DateTime<Utc>) -> SqlValue
Bind the auth UTC clock using this model column’s timestamp wire type.
fn column_kind(column: &str) -> ColumnKind
Source§impl SqlxVerificationModel for Model
impl SqlxVerificationModel for Model
fn id_column() -> &'static str
fn identifier_column() -> &'static str
fn value_column() -> &'static str
fn expires_at_column() -> &'static str
fn created_at_column() -> &'static str
fn updated_at_column() -> Option<&'static str>
fn new_active( id: Option<SqlValue>, verification: CreateVerification, now: DateTime<Utc>, ) -> ActiveRow
Source§fn parse_reservation_id(encoded: &str, digest: [u8; 32]) -> AuthResult<SqlValue>
fn parse_reservation_id(encoded: &str, digest: [u8; 32]) -> AuthResult<SqlValue>
Convert a deterministic reservation key to this schema’s ID type.
String schemas use the upstream key. UUID schemas can accept the UUID
derived from the same digest; numeric schemas must explicitly provide
a collision-resistant reservation strategy instead of truncating it. Read more
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
Blanket Implementations§
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
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more