pub struct FilesystemBackend { /* private fields */ }
Available on crate feature
session
only.Expand description
Filesystem session backend
Implementations§
Trait Implementations§
source§impl Clone for FilesystemBackend
impl Clone for FilesystemBackend
source§fn clone(&self) -> FilesystemBackend
fn clone(&self) -> FilesystemBackend
Returns a copy 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 moresource§impl SessionBackend for FilesystemBackend
impl SessionBackend for FilesystemBackend
§type Error = FilesystemBackendError
type Error = FilesystemBackendError
An error occurred in backend
source§async fn get_sessions(
&mut self
) -> Result<Vec<String>, <FilesystemBackend as SessionBackend>::Error>
async fn get_sessions( &mut self ) -> Result<Vec<String>, <FilesystemBackend as SessionBackend>::Error>
Returns a list of available session IDs
source§async fn get_session_age(
&mut self,
session_id: &str
) -> Result<Option<u64>, <FilesystemBackend as SessionBackend>::Error>
async fn get_session_age( &mut self, session_id: &str ) -> Result<Option<u64>, <FilesystemBackend as SessionBackend>::Error>
Returns the time when session was created in seconds Read more
source§async fn remove_session(
&mut self,
session_id: &str
) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
async fn remove_session( &mut self, session_id: &str ) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
Removes a session Read more
source§async fn read_value(
&mut self,
session_id: &str,
key: &str
) -> Result<Option<Vec<u8>>, <FilesystemBackend as SessionBackend>::Error>
async fn read_value( &mut self, session_id: &str, key: &str ) -> Result<Option<Vec<u8>>, <FilesystemBackend as SessionBackend>::Error>
Read a value from store Read more
source§async fn write_value(
&mut self,
session_id: &str,
key: &str,
value: &[u8]
) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
async fn write_value( &mut self, session_id: &str, key: &str, value: &[u8] ) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
Write a value to store Read more
source§async fn remove_value(
&mut self,
session_id: &str,
key: &str
) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
async fn remove_value( &mut self, session_id: &str, key: &str ) -> Result<(), <FilesystemBackend as SessionBackend>::Error>
Remove a value from store Read more
Auto Trait Implementations§
impl Freeze for FilesystemBackend
impl RefUnwindSafe for FilesystemBackend
impl Send for FilesystemBackend
impl Sync for FilesystemBackend
impl Unpin for FilesystemBackend
impl UnwindSafe for FilesystemBackend
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more