pub struct LibsqlConnectionManager { /* private fields */ }
Expand description
An bb8::ManageConnection
for libsql::Connection
s.
Implementations§
Source§impl LibsqlConnectionManager
impl LibsqlConnectionManager
Sourcepub fn local<P: AsRef<Path>>(path: P) -> Self
pub fn local<P: AsRef<Path>>(path: P) -> Self
Creates a new LibsqlConnectionManager
from local file.
See libsql::Builder::new_local
Sourcepub fn remote(url: &str, token: &str) -> Self
pub fn remote(url: &str, token: &str) -> Self
Creates a new LibsqlConnectionManager
from remote.
See libsql::Builder::new_remote
Sourcepub fn local_replica<P: AsRef<Path>>(path: P) -> Self
pub fn local_replica<P: AsRef<Path>>(path: P) -> Self
Creates a new LibsqlConnectionManager
from local replica.
See libsql::Builder::new_local_replica
Trait Implementations§
Source§impl Debug for LibsqlConnectionManager
impl Debug for LibsqlConnectionManager
Source§impl ManageConnection for LibsqlConnectionManager
impl ManageConnection for LibsqlConnectionManager
Source§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
Source§type Error = ConnectionManagerError
type Error = ConnectionManagerError
The error type returned by
Connection
s.Source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Connection, ConnectionManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Connection, ConnectionManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempts to create a new connection.
Source§fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Connection,
) -> Pin<Box<dyn Future<Output = Result<(), ConnectionManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Connection,
) -> Pin<Box<dyn Future<Output = Result<(), ConnectionManagerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determines if the connection is still connected to the database.
Source§fn has_broken(&self, _: &mut Connection) -> bool
fn has_broken(&self, _: &mut Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Auto Trait Implementations§
impl Freeze for LibsqlConnectionManager
impl RefUnwindSafe for LibsqlConnectionManager
impl Send for LibsqlConnectionManager
impl Sync for LibsqlConnectionManager
impl Unpin for LibsqlConnectionManager
impl UnwindSafe for LibsqlConnectionManager
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> 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