Struct rocket_auth::Session [−][src]
The Session guard can be used to retrieve user session data.
Unlike User
, using session does not verify that the session data is
still valid. Since the client could have logged out, or their session
may have expired. The Session guard is intended for purposes where
verifying the validity of the session data is unnecessary.
Note that,
session data is already captured by the [Auth
] guard and stored in the public session
field.
So it is not necesarry to use them together.
Fields
id: i32
The user id as it is stored on the database.
email: String
The user email.
auth_key: String
An random authentication token key.
time_stamp: i32
It represents the Unix time in which the user logged in. It is measured in seconds.
Trait Implementations
impl<'de> Deserialize<'de> for Session
[src]
impl<'de> Deserialize<'de> for Session
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a, 'r> FromRequest<'a, 'r> for Session
[src]
impl<'a, 'r> FromRequest<'a, 'r> for Session
[src]Auto Trait Implementations
impl RefUnwindSafe for Session
impl RefUnwindSafe for Session
impl UnwindSafe for Session
impl UnwindSafe for Session
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,