pub struct JsonFileAdapter { /* private fields */ }Expand description
A JSON-file persistence backend. Each session is stored as
<dir>/<id>.json. Suitable for local single-node deployments where
Postgres (MVP 4) is not available.
Implementations§
Trait Implementations§
Source§impl PersistenceAdapter for JsonFileAdapter
impl PersistenceAdapter for JsonFileAdapter
Source§fn save_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
data: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
data: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist a session’s serialized state.
Auto Trait Implementations§
impl Freeze for JsonFileAdapter
impl RefUnwindSafe for JsonFileAdapter
impl Send for JsonFileAdapter
impl Sync for JsonFileAdapter
impl Unpin for JsonFileAdapter
impl UnsafeUnpin for JsonFileAdapter
impl UnwindSafe for JsonFileAdapter
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