SessionDepotExt

Trait SessionDepotExt 

Source
pub trait SessionDepotExt {
    // Required methods
    fn set_session(&mut self, session: Session) -> &mut Self;
    fn take_session(&mut self) -> Option<Session>;
    fn session(&self) -> Option<&Session>;
    fn session_mut(&mut self) -> Option<&mut Session>;
}
Expand description

Trait for Depot to get and set session.

Required Methods§

Source

fn set_session(&mut self, session: Session) -> &mut Self

Sets session

Source

fn take_session(&mut self) -> Option<Session>

Take session

Source

fn session(&self) -> Option<&Session>

Get session reference

Source

fn session_mut(&mut self) -> Option<&mut Session>

Get session mutable reference

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SessionDepotExt for Depot

Source§

fn set_session(&mut self, session: Session) -> &mut Self

Source§

fn take_session(&mut self) -> Option<Session>

Source§

fn session(&self) -> Option<&Session>

Source§

fn session_mut(&mut self) -> Option<&mut Session>

Implementors§