Struct mockall::examples::mock_ffi::__ffi_func::ExpectationGuard [−][src]
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Like an &Expectation
but
protected by a Mutex guard. Useful for mocking static
methods. Forwards accesses to an Expectation
object.
Implementations
impl<'__mockall_lt> ExpectationGuard<'__mockall_lt>
[src]
pub fn in_sequence(&mut self, __mockall_seq: &mut Sequence) -> &mut Expectation
[src]
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::in_sequence
pub fn never(&mut self) -> &mut Expectation
[src]
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::never
pub fn once(&mut self) -> &mut Expectation
[src]
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::once
pub fn return_const<MockallOutput>(
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectation where
MockallOutput: Clone + Into<()> + Send + 'static,
[src]
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectation where
MockallOutput: Clone + Into<()> + Send + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::return_const
pub fn return_const_st<MockallOutput>(
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectation where
MockallOutput: Clone + Into<()> + 'static,
[src]
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectation where
MockallOutput: Clone + Into<()> + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::return_const_st
pub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
MockallF: FnMut() + Send + 'static,
[src]
MockallF: FnMut() + Send + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::returning
pub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnOnce() + Send + 'static,
[src]
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnOnce() + Send + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::return_once
pub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnOnce() + 'static,
[src]
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnOnce() + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::return_once_st
pub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnMut() + 'static,
[src]
&mut self,
__mockall_f: MockallF
) -> &mut Expectation where
MockallF: FnMut() + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::returning_st
pub fn times<MockallR>(&mut self, __mockall_r: MockallR) -> &mut Expectation where
MockallR: Into<TimesRange>,
[src]
MockallR: Into<TimesRange>,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::times
pub fn with(&mut self) -> &mut Expectation
[src]
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::with
pub fn withf<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
MockallF: Fn() -> bool + Send + 'static,
[src]
MockallF: Fn() -> bool + Send + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::withf
pub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
MockallF: Fn() -> bool + 'static,
[src]
MockallF: Fn() -> bool + 'static,
Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }
Just like
Expectation::withf_st
Auto Trait Implementations
impl<'__mockall_lt> RefUnwindSafe for ExpectationGuard<'__mockall_lt>
[src]
impl<'__mockall_lt> !Send for ExpectationGuard<'__mockall_lt>
[src]
impl<'__mockall_lt> Sync for ExpectationGuard<'__mockall_lt>
[src]
impl<'__mockall_lt> Unpin for ExpectationGuard<'__mockall_lt>
[src]
impl<'__mockall_lt> UnwindSafe for ExpectationGuard<'__mockall_lt>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
[src]
T: Any + ?Sized,
pub fn type_id_compat(&self) -> TypeId
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,