pub struct SessionContextSession { /* private fields */ }Implementations§
Source§impl SessionContextSession
impl SessionContextSession
pub fn new(session: Session) -> Self
pub fn from_resolved_config( session: Session, config: &ResolvedSessionContextConfig, ) -> Self
pub fn with_key( session: Session, session_context_key: impl Into<String>, ) -> Self
pub fn raw_session(&self) -> &Session
pub async fn insert<Extra>(
&self,
context: &SessionContext<Extra>,
) -> SessionContextResult<()>where
Extra: Serialize,
pub async fn get<Extra>(
&self,
) -> SessionContextResult<Option<SessionContext<Extra>>>where
Extra: DeserializeOwned,
pub async fn require<Extra>(
&self,
) -> SessionContextResult<SessionContext<Extra>>where
Extra: DeserializeOwned,
pub async fn clear(&self) -> SessionContextResult<()>
pub async fn is_authenticated<Extra>(&self) -> SessionContextResult<bool>where
Extra: DeserializeOwned,
pub async fn cycle_id(&self) -> SessionContextResult<()>
pub async fn flush(&self) -> SessionContextResult<()>
Trait Implementations§
Source§impl Clone for SessionContextSession
impl Clone for SessionContextSession
Source§fn clone(&self) -> SessionContextSession
fn clone(&self) -> SessionContextSession
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 moreAuto Trait Implementations§
impl Freeze for SessionContextSession
impl !RefUnwindSafe for SessionContextSession
impl Send for SessionContextSession
impl Sync for SessionContextSession
impl Unpin for SessionContextSession
impl UnsafeUnpin for SessionContextSession
impl !UnwindSafe for SessionContextSession
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