pub struct Manager { /* private fields */ }Expand description
Manager for creating and recycling libsql::Connection.
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn from_libsql_database(database: Database) -> Self
pub fn from_libsql_database(database: Database) -> Self
Creates a new Manager using the given libsql::Database.
Sourcepub async fn from_config(config: Config) -> Result<Self, Error>
pub async fn from_config(config: Config) -> Result<Self, Error>
Creates a new Manager using the given config::Config.
Trait Implementations§
Source§impl Manager for Manager
impl Manager for Manager
Source§type Error = ConnectionError
type Error = ConnectionError
Source§async fn create(&self) -> Result<Self::Type, Self::Error>
async fn create(&self) -> Result<Self::Type, Self::Error>
Creates a new instance of
Manager::Type.Source§async fn recycle(
&self,
conn: &mut Self::Type,
_: &Metrics,
) -> RecycleResult<Self::Error>
async fn recycle( &self, conn: &mut Self::Type, _: &Metrics, ) -> RecycleResult<Self::Error>
Tries to recycle an instance of
Manager::Type. Read moreAuto Trait Implementations§
impl !Freeze for Manager
impl !RefUnwindSafe for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl !UnwindSafe for Manager
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