Struct rbdc::pool::conn_manager::ConnManager
source · pub struct ConnManager {
pub driver: Arc<Box<dyn Driver>>,
pub option: Arc<Box<dyn ConnectOptions>>,
}
Fields§
§driver: Arc<Box<dyn Driver>>
§option: Arc<Box<dyn ConnectOptions>>
Implementations§
source§impl ConnManager
impl ConnManager
sourcepub fn spawn_task<T>(&self, task: T)
pub fn spawn_task<T>(&self, task: T)
spawn task on runtime
pub fn new<D: Driver + 'static>(driver: D, url: &str) -> Result<Self, Error>
pub fn new_opt<D: Driver + 'static, Option: ConnectOptions>( driver: D, option: Option ) -> Self
pub fn new_opt_box( driver: Box<dyn Driver>, option: Box<dyn ConnectOptions> ) -> Self
pub fn driver_type(&self) -> &str
pub async fn connect(&self) -> Result<ConnectionBox, Error>
pub async fn check(&self, conn: &mut ConnectionBox) -> Result<(), Error>
Trait Implementations§
source§impl Clone for ConnManager
impl Clone for ConnManager
source§fn clone(&self) -> ConnManager
fn clone(&self) -> ConnManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnManager
impl Send for ConnManager
impl Sync for ConnManager
impl Unpin for ConnManager
impl !UnwindSafe for ConnManager
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