pub struct Token {
pub token: String,
pub user_id: String,
pub expiration: NaiveDateTime,
}Expand description
Token Struct
Fields§
§token: String§user_id: String§expiration: NaiveDateTimeImplementations§
Source§impl Token
Methods related to the token struct
impl Token
Methods related to the token struct
Trait Implementations§
Source§impl Insertable<table> for Tokenwhere
String: AsExpression<<token as Expression>::SqlType> + AsExpression<<user_id as Expression>::SqlType>,
NaiveDateTime: AsExpression<<expiration as Expression>::SqlType>,
impl Insertable<table> for Tokenwhere
String: AsExpression<<token as Expression>::SqlType> + AsExpression<<user_id as Expression>::SqlType>,
NaiveDateTime: AsExpression<<expiration as Expression>::SqlType>,
Source§type Values = <(Option<Grouped<Eq<token, <String as AsExpression<<token as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <String as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<expiration, <NaiveDateTime as AsExpression<<expiration as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<token, <String as AsExpression<<token as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <String as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<expiration, <NaiveDateTime as AsExpression<<expiration as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<token, String>>, Option<Eq<user_id, String>>, Option<Eq<expiration, NaiveDateTime>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<token, String>>, Option<Eq<user_id, String>>, Option<Eq<expiration, NaiveDateTime>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl<'insert> Insertable<table> for &'insert Tokenwhere
&'insert String: AsExpression<<token as Expression>::SqlType> + AsExpression<<user_id as Expression>::SqlType>,
&'insert NaiveDateTime: AsExpression<<expiration as Expression>::SqlType>,
impl<'insert> Insertable<table> for &'insert Tokenwhere
&'insert String: AsExpression<<token as Expression>::SqlType> + AsExpression<<user_id as Expression>::SqlType>,
&'insert NaiveDateTime: AsExpression<<expiration as Expression>::SqlType>,
Source§type Values = <(Option<Grouped<Eq<token, <&'insert String as AsExpression<<token as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert String as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<expiration, <&'insert NaiveDateTime as AsExpression<<expiration as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<token, <&'insert String as AsExpression<<token as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert String as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<expiration, <&'insert NaiveDateTime as AsExpression<<expiration as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<token, &'insert String>>, Option<Eq<user_id, &'insert String>>, Option<Eq<expiration, &'insert NaiveDateTime>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<token, &'insert String>>, Option<Eq<user_id, &'insert String>>, Option<Eq<expiration, &'insert NaiveDateTime>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for Token
impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for Token
Source§impl<__DB: Backend> QueryableByName<__DB> for Tokenwhere
String: FromSql<SqlTypeOf<token>, __DB> + FromSql<SqlTypeOf<user_id>, __DB>,
NaiveDateTime: FromSql<SqlTypeOf<expiration>, __DB>,
impl<__DB: Backend> QueryableByName<__DB> for Tokenwhere
String: FromSql<SqlTypeOf<token>, __DB> + FromSql<SqlTypeOf<user_id>, __DB>,
NaiveDateTime: FromSql<SqlTypeOf<expiration>, __DB>,
Source§impl<__DB: Backend> Selectable<__DB> for Token
impl<__DB: Backend> Selectable<__DB> for Token
Source§type SelectExpression = (token, user_id, expiration)
type SelectExpression = (token, user_id, expiration)
The expression you’d like to select. Read more
Source§fn construct_selection() -> Self::SelectExpression
fn construct_selection() -> Self::SelectExpression
Construct an instance of the expression
impl UndecoratedInsertRecord<table> for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
Add an aggregate function filter Read more
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
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<T> CloneAny for T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<DB, T> FromSqlRow<Untyped, DB> for Twhere
DB: Backend,
T: QueryableByName<DB>,
impl<DB, T> FromSqlRow<Untyped, DB> for Twhere
DB: Backend,
T: QueryableByName<DB>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
§fn as_select() -> SelectBy<T, DB>
fn as_select() -> SelectBy<T, DB>
Construct a select clause based on a [
Selectable] implementation. Read more§fn as_returning() -> SelectBy<Self, DB>
fn as_returning() -> SelectBy<Self, DB>
An alias for
as_select that can be used with returning clauses§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.
impl<T> UnsafeAny for Twhere
T: Any,
§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
§fn window_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn window_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
Add a filter to the current window function Read more
§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more