Struct taos_query::Manager
source · pub struct Manager<T> { /* private fields */ }
Expand description
This is how we manage connections.
Implementations§
source§impl<T: TBuilder> Manager<T>
impl<T: TBuilder> Manager<T>
pub fn new(builder: T) -> Self
sourcepub fn from_dsn<D: IntoDsn>(
dsn: D
) -> Result<(Self, BTreeMap<String, String>), T::Error>
pub fn from_dsn<D: IntoDsn>( dsn: D ) -> Result<(Self, BTreeMap<String, String>), T::Error>
Build a connection manager from a DSN.
pub fn into_pool(self) -> Result<Pool<Self>, Error>
pub fn into_pool_with_builder( self, builder: Builder<Self> ) -> Result<Pool<Self>, Error>
Trait Implementations§
source§impl<T: TBuilder> ManageConnection for Manager<T>
impl<T: TBuilder> ManageConnection for Manager<T>
§type Connection = <T as TBuilder>::Target
type Connection = <T as TBuilder>::Target
The connection type this manager deals with.
source§fn connect(&self) -> Result<Self::Connection, Self::Error>
fn connect(&self) -> Result<Self::Connection, Self::Error>
Attempts to create a new connection.
source§fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
Determines if the connection is still connected to the database. Read more
source§fn has_broken(&self, _: &mut Self::Connection) -> bool
fn has_broken(&self, _: &mut Self::Connection) -> bool
Quickly determines if the connection is no longer usable. Read more