pub trait RawSession {
    type WriteError: Into<Error>;
    type WriteSession: TryFuture<Ok = (), Error = Self::WriteError>;

    fn get(&self, name: &str) -> Option<&str>;
    fn set(&mut self, name: &str, value: String);
    fn remove(&mut self, name: &str);
    fn clear(&mut self);
    fn write(self) -> Self::WriteSession;
}
Expand description

A trait that abstracts the management of session data during request handling.

Required Associated Types§

The error type during writing modification to the backend.

A TryFuture to write the modification of session data.

Required Methods§

Returns the value of session data with the specified key name, if exists.

Appends a value to session data with the specified key name.

Removes the value with the specified key name from session data.

Mark the session data as cleared.

Consumes itself and creates a TryFuture to write the modification of session data.

Implementors§