Struct diesel::r2d2::ConnectionManager [−][src]
pub struct ConnectionManager<T> { /* fields omitted */ }An r2d2 connection manager for use with Diesel.
See the r2d2 documentation for usage examples.
Methods
impl<T> ConnectionManager<T>[src]
impl<T> ConnectionManager<T>pub fn new<S: Into<String>>(database_url: S) -> Self[src]
pub fn new<S: Into<String>>(database_url: S) -> SelfReturns a new connection manager, which establishes connections to the given database URL.
Trait Implementations
impl<T: Debug> Debug for ConnectionManager<T>[src]
impl<T: Debug> Debug for ConnectionManager<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for ConnectionManager<T>[src]
impl<T: Clone> Clone for ConnectionManager<T>fn clone(&self) -> ConnectionManager<T>[src]
fn clone(&self) -> ConnectionManager<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T: Send + 'static> Sync for ConnectionManager<T>[src]
impl<T: Send + 'static> Sync for ConnectionManager<T>impl<T> ManageConnection for ConnectionManager<T> where
T: Connection + Send + 'static, [src]
impl<T> ManageConnection for ConnectionManager<T> where
T: Connection + Send + 'static, type Connection = T
The connection type this manager deals with.
type Error = Error
The error type returned by Connections.
fn connect(&self) -> Result<T, Error>[src]
fn connect(&self) -> Result<T, Error>Attempts to create a new connection.
fn is_valid(&self, conn: &mut T) -> Result<(), Error>[src]
fn is_valid(&self, conn: &mut T) -> Result<(), Error>Determines if the connection is still connected to the database. Read more
fn has_broken(&self, _conn: &mut T) -> bool[src]
fn has_broken(&self, _conn: &mut T) -> boolQuickly determines if the connection is no longer usable. Read more
Auto Trait Implementations
impl<T> Send for ConnectionManager<T> where
T: Send,
impl<T> Send for ConnectionManager<T> where
T: Send,