pub struct SessionLayer<T>{
session_store: SessionStore<T>,
}Expand description
Sessions Layer used with Axum to activate the Service.
ยงExamples
โ
use axum_session::{SessionNullPool, SessionConfig, SessionStore, SessionLayer};
use uuid::Uuid;
let config = SessionConfig::default();
let session_store = SessionStore::<SessionNullPool>::new(None, config).await.unwrap();
let layer = SessionLayer::new(session_store);Fieldsยง
ยงsession_store: SessionStore<T>Implementationsยง
Sourceยงimpl<T> SessionLayer<T>
impl<T> SessionLayer<T>
Sourcepub fn new(session_store: SessionStore<T>) -> Self
pub fn new(session_store: SessionStore<T>) -> Self
Constructs a SessionLayer used with Axum to activate the Service.
ยงExamples
โ
use axum_session::{SessionNullPool, SessionConfig, SessionStore, SessionLayer};
use uuid::Uuid;
let config = SessionConfig::default();
let session_store = SessionStore::<SessionNullPool>::new(None, config).await.unwrap();
let layer = SessionLayer::new(session_store);Trait Implementationsยง
Sourceยงimpl<T> Clone for SessionLayer<T>
impl<T> Clone for SessionLayer<T>
Sourceยงfn clone(&self) -> SessionLayer<T>
fn clone(&self) -> SessionLayer<T>
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl<S, T> Layer<S> for SessionLayer<T>
impl<S, T> Layer<S> for SessionLayer<T>
Auto Trait Implementationsยง
impl<T> Freeze for SessionLayer<T>where
T: Freeze,
impl<T> !RefUnwindSafe for SessionLayer<T>
impl<T> Send for SessionLayer<T>
impl<T> Sync for SessionLayer<T>
impl<T> Unpin for SessionLayer<T>where
T: Unpin,
impl<T> !UnwindSafe for SessionLayer<T>
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