/// Inserts a key-value pair into the session.
///
/// Any serializable value can be used and will be encoded as JSON in session data, hence why
/// only a reference to the value is taken.
Inserts a key-value pair into the session.
Any serializable value can be used and will be encoded as JSON in session data, hence why
only a reference to the value is taken.
Inserts a key - value pair into the session . Any serializable value can be used and will be encoded as JSON in session data hence why only a reference to the value is taken .
pub fn insert(&self, key: impl Into<String>, value: impl Serialize) -> Result<(), Error> {
        let mut inner = self.0.borrow_mut();
        if inner.status != SessionStatus::Purged {
            inner.status = SessionStatus::Changed;
            let val = serde_json::to_string(&value)?;
            todo!();
        }
        Ok(())
    }
pub fn insert ( & self , key : impl Into < String > , value : impl Serialize ) -> Result < ( ) , Error > { let mut inner = self . 0 . borrow_mut ( ) ; if inner . status != SessionStatus :: Purged { inner . status = SessionStatus :: Changed ; let val = serde_json :: to_string ( & value ) ? ; todo ! ( ) ; } Ok ( ( ) ) }
Inserts a key-value pair into the session.
Inserts a key - value pair into the session .
&self
key
impl Into<String>
value
impl Serialize