pub struct LibsqlStore { /* private fields */ }
Expand description
A libSQL session store.
Implementations§
Source§impl LibsqlStore
impl LibsqlStore
Sourcepub fn new(client: Connection) -> Self
pub fn new(client: Connection) -> Self
Create a new libSQL store with the provided connection pool.
Trait Implementations§
Source§impl Clone for LibsqlStore
impl Clone for LibsqlStore
Source§fn clone(&self) -> LibsqlStore
fn clone(&self) -> LibsqlStore
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 moreSource§impl Debug for LibsqlStore
impl Debug for LibsqlStore
Source§impl ExpiredDeletion for LibsqlStore
impl ExpiredDeletion for LibsqlStore
Source§fn delete_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A method for deleting expired sessions from the store.
Source§fn continuously_delete_expired<'async_trait>(
self,
period: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn continuously_delete_expired<'async_trait>(
self,
period: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
This function will keep running indefinitely, deleting expired rows and
then waiting for the specified period before deleting again. Read more
Source§impl SessionStore for LibsqlStore
impl SessionStore for LibsqlStore
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 mut Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 mut Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new session in the store with the provided session record. Read more
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves the provided session record to the store. Read more
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 Id,
) -> Pin<Box<dyn Future<Output = Result<Option<Record>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 Id,
) -> Pin<Box<dyn Future<Output = Result<Option<Record>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads an existing session record from the store using the provided ID. Read more
Auto Trait Implementations§
impl Freeze for LibsqlStore
impl !RefUnwindSafe for LibsqlStore
impl Send for LibsqlStore
impl Sync for LibsqlStore
impl Unpin for LibsqlStore
impl !UnwindSafe for LibsqlStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request