pub struct Connection { /* private fields */ }
Expand description
Database connection.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn new(
odbc: &'static Odbc,
connection_string: &str,
) -> Result<Connection, OdbcError>
pub fn new( odbc: &'static Odbc, connection_string: &str, ) -> Result<Connection, OdbcError>
Connect to database using connection string with default configuration options. This implementation will synchronize driver connect calls.
Sourcepub unsafe fn new_concurrent(
odbc: &'static Odbc,
connection_string: &str,
) -> Result<Connection, OdbcError>
pub unsafe fn new_concurrent( odbc: &'static Odbc, connection_string: &str, ) -> Result<Connection, OdbcError>
Connect to database using connection string with default configuration options. Assume that driver connect call is thread safe.
Sourcepub fn with_settings(
odbc: &'static Odbc,
connection_string: &str,
settings: Settings,
) -> Result<Connection, OdbcError>
pub fn with_settings( odbc: &'static Odbc, connection_string: &str, settings: Settings, ) -> Result<Connection, OdbcError>
Connect to database using connection string with configuration options. This implementation will synchronize driver connect calls.
Sourcepub unsafe fn with_settings_concurrent(
odbc: &'static Odbc,
connection_string: &str,
settings: Settings,
) -> Result<Connection, OdbcError>
pub unsafe fn with_settings_concurrent( odbc: &'static Odbc, connection_string: &str, settings: Settings, ) -> Result<Connection, OdbcError>
Connect to database using connection string with configuration options. Assume that driver connect call is thread safe.
Source§impl<'c: 'c> Connection
impl<'c: 'c> Connection
pub fn handle(&'c mut self) -> Handle<'c, DefaultConfiguration>
pub fn handle_with_configuration<C: Configuration>( &'c mut self, configuration: C, ) -> Handle<'c, C>
Trait Implementations§
Source§impl Debug for Connection
impl Debug for Connection
impl Send for Connection
Assuming drivers support sending Connection between threads.
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl !Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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