pub struct DynConnectionManager { /* private fields */ }Expand description
A type-erased connection manager that resolves an OLT model string at runtime.
Use this when the OLT vendor/model is only known at runtime (e.g. stored in a database).
For a compile-time–known model, prefer ConnectionManager<T> instead.
Implementations§
Trait Implementations§
Source§impl Debug for DynConnectionManager
impl Debug for DynConnectionManager
Source§impl ManageConnection for DynConnectionManager
impl ManageConnection for DynConnectionManager
Source§type Connection = Box<dyn Olt>
type Connection = Box<dyn Olt>
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, _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 DynConnectionManager
impl RefUnwindSafe for DynConnectionManager
impl Send for DynConnectionManager
impl Sync for DynConnectionManager
impl Unpin for DynConnectionManager
impl UnsafeUnpin for DynConnectionManager
impl UnwindSafe for DynConnectionManager
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