Struct authzen_session::Session
source · pub struct Session<T> {
pub session_id: Uuid,
pub created_at: NaiveDateTime,
pub value: T,
pub max_age: Option<Duration>,
pub expires: Option<NaiveDateTime>,
}Fields§
§session_id: Uuid§created_at: NaiveDateTime§value: T§max_age: Option<Duration>§expires: Option<NaiveDateTime>Implementations§
source§impl<AccountId, Fields> Session<AccountSessionToken<AccountSessionClaims<AccountId, Fields>>>
impl<AccountId, Fields> Session<AccountSessionToken<AccountSessionClaims<AccountId, Fields>>>
pub fn account_id(&self) -> &AccountId
pub fn fields(&self) -> &Fields
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Session<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Session<T>where T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<B, T> FromRequest<B> for Session<T>where
B: Send,
T: DeserializeOwned + Send + Sync + 'static,
Available on crate feature axum-core-02 only.
impl<B, T> FromRequest<B> for Session<T>where B: Send, T: DeserializeOwned + Send + Sync + 'static,
Available on crate feature
axum-core-02 only.§type Rejection = StatusCode
type Rejection = StatusCode
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
source§fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn from_request<'life0, 'async_trait>( req: &'life0 mut RequestParts<B> ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Perform the extraction.
source§impl<S, B, T> FromRequest<S, B, ViaRequest> for Session<T>where
S: Send + Sync,
B: Send + 'static,
T: DeserializeOwned + Send + Sync + 'static,
Available on crate feature axum-core-03 only.
impl<S, B, T> FromRequest<S, B, ViaRequest> for Session<T>where S: Send + Sync, B: Send + 'static, T: DeserializeOwned + Send + Sync + 'static,
Available on crate feature
axum-core-03 only.§type Rejection = StatusCode
type Rejection = StatusCode
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.