Struct typed_session_axum::WritableSession
source · pub struct WritableSession<SessionData> { /* private fields */ }
Expand description
An extractor which provides a writable session. Note that this provides an exclusive (mutable) reference to the session associated with the HTTP request. If two HTTP requests are made with the same session id, the session may be altered by both requests at the same time, resulting in conflicts in the session store. In this case, the session layer produces an error that needs to be handled.
Trait Implementations§
source§impl<SessionData: Debug> Debug for WritableSession<SessionData>
impl<SessionData: Debug> Debug for WritableSession<SessionData>
source§impl<SessionData> Deref for WritableSession<SessionData>
impl<SessionData> Deref for WritableSession<SessionData>
source§impl<SessionData> DerefMut for WritableSession<SessionData>
impl<SessionData> DerefMut for WritableSession<SessionData>
source§impl<S, SessionData: Send + Sync + 'static> FromRequestParts<S> for WritableSession<SessionData>where
S: Send + Sync,
impl<S, SessionData: Send + Sync + 'static> FromRequestParts<S> for WritableSession<SessionData>where S: Send + Sync,
§type Rejection = Infallible
type Rejection = Infallible
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Auto Trait Implementations§
impl<SessionData> !RefUnwindSafe for WritableSession<SessionData>
impl<SessionData> Send for WritableSession<SessionData>where SessionData: Send + Sync,
impl<SessionData> Sync for WritableSession<SessionData>where SessionData: Send + Sync,
impl<SessionData> Unpin for WritableSession<SessionData>where SessionData: Unpin,
impl<SessionData> !UnwindSafe for WritableSession<SessionData>
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