Struct poem::session::CookieSession
source · [−]pub struct CookieSession { /* private fields */ }
Available on crate feature
session
only.Expand description
Middleware for client-side(cookie) session.
Implementations
sourceimpl CookieSession
impl CookieSession
sourcepub fn new(config: CookieConfig) -> Self
pub fn new(config: CookieConfig) -> Self
Create a CookieSession
middleware.
It stores the session data in a single cookie, and the serialized session data cannot exceed 4k bytes.
Trait Implementations
sourceimpl<E: Endpoint> Middleware<E> for CookieSession
impl<E: Endpoint> Middleware<E> for CookieSession
type Output = CookieJarManagerEndpoint<CookieSessionEndpoint<E>>
type Output = CookieJarManagerEndpoint<CookieSessionEndpoint<E>>
New endpoint type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CookieSession
impl Send for CookieSession
impl Sync for CookieSession
impl Unpin for CookieSession
impl UnwindSafe for CookieSession
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more