pub struct InfluxDbConnectionManager { /* private fields */ }
Expand description
Encapsulates the InfluxDB connection properties.
Implementations§
Source§impl InfluxDbConnectionManager
impl InfluxDbConnectionManager
Sourcepub fn new<T>(host: T, port: u16, db_name: T) -> Selfwhere
T: ToString,
pub fn new<T>(host: T, port: u16, db_name: T) -> Selfwhere
T: ToString,
Create a connection manager with just hostname and port.
Sourcepub fn new_with_authentication<T>(
host: T,
port: u16,
db_name: T,
auth: Authentication,
) -> Selfwhere
T: ToString,
pub fn new_with_authentication<T>(
host: T,
port: u16,
db_name: T,
auth: Authentication,
) -> Selfwhere
T: ToString,
Create a connection manager with username and password authentication.
pub fn connect_new(&self) -> Client
Trait Implementations§
Source§impl ManageConnection for InfluxDbConnectionManager
impl ManageConnection for InfluxDbConnectionManager
Source§type Connection = Client
type Connection = Client
The connection type this manager deals with.
Source§type Error = InfluxDbConnectionManagerError
type Error = InfluxDbConnectionManagerError
The error type returned by
Connection
s.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, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Quickly determines if the connection is no longer usable. Read more
Auto Trait Implementations§
impl Freeze for InfluxDbConnectionManager
impl RefUnwindSafe for InfluxDbConnectionManager
impl Send for InfluxDbConnectionManager
impl Sync for InfluxDbConnectionManager
impl Unpin for InfluxDbConnectionManager
impl UnwindSafe for InfluxDbConnectionManager
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