pub struct MockConnection { /* private fields */ }Implementations§
Source§impl MockConnection
impl MockConnection
pub fn new() -> Arc<Self> ⓘ
pub fn with_command(command: Arc<dyn Command>) -> Arc<Self> ⓘ
pub fn with_command_provider( command: Arc<dyn Command>, provider: impl Into<String>, ) -> Arc<Self> ⓘ
pub fn with_transaction(transaction: Arc<dyn Transaction>) -> Arc<Self> ⓘ
pub fn set_open_error(&self, message: impl Into<String>)
pub fn set_close_error(&self, message: impl Into<String>)
pub fn set_start_error(&self, message: impl Into<String>)
pub fn open_calls(&self) -> usize
pub fn start_calls(&self) -> usize
pub fn is_open(&self) -> bool
pub fn last_isolation(&self) -> IsolationLevel
Trait Implementations§
Source§impl Connection for MockConnection
impl Connection for MockConnection
fn as_any(&self) -> &dyn Any
fn provider(&self) -> &str
fn is_open(&self) -> bool
fn create_command(&self) -> Arc<dyn Command> ⓘ
fn open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_transaction<'life0, 'async_trait>(
&'life0 self,
isolation: Option<IsolationLevel>,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for MockConnection
impl !RefUnwindSafe for MockConnection
impl !UnwindSafe for MockConnection
impl Forget for MockConnection
impl Send for MockConnection
impl Sync for MockConnection
impl Unpin for MockConnection
impl UnsafeUnpin for MockConnection
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