Struct mockall::examples::__mock_MockFoo_Foo::__bang::ExpectationGuard
source · pub struct ExpectationGuard<'__mockall_lt> { /* private fields */ }
Expand description
Like an &Expectation
but
protected by a Mutex guard. Useful for mocking static
methods. Forwards accesses to an Expectation
object.
Implementations§
source§impl<'__mockall_lt> ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> ExpectationGuard<'__mockall_lt>
sourcepub fn in_sequence(&mut self, __mockall_seq: &mut Sequence) -> &mut Expectation
pub fn in_sequence(&mut self, __mockall_seq: &mut Sequence) -> &mut Expectation
Just like
Expectation::in_sequence
sourcepub fn never(&mut self) -> &mut Expectation
pub fn never(&mut self) -> &mut Expectation
Just like
Expectation::never
sourcepub fn once(&mut self) -> &mut Expectation
pub fn once(&mut self) -> &mut Expectation
Just like
Expectation::once
sourcepub fn return_const<MockallOutput>(
&mut self,
__mockall_c: MockallOutput,
) -> &mut Expectation
pub fn return_const<MockallOutput>( &mut self, __mockall_c: MockallOutput, ) -> &mut Expectation
Just like
Expectation::return_const
sourcepub fn return_const_st<MockallOutput>(
&mut self,
__mockall_c: MockallOutput,
) -> &mut Expectation
pub fn return_const_st<MockallOutput>( &mut self, __mockall_c: MockallOutput, ) -> &mut Expectation
Just like
Expectation::return_const_st
sourcepub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
pub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
Just like
Expectation::returning
sourcepub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectation
pub fn return_once<MockallF>( &mut self, __mockall_f: MockallF, ) -> &mut Expectation
Just like
Expectation::return_once
sourcepub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectation
pub fn return_once_st<MockallF>( &mut self, __mockall_f: MockallF, ) -> &mut Expectation
Just like
Expectation::return_once_st
sourcepub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectation
pub fn returning_st<MockallF>( &mut self, __mockall_f: MockallF, ) -> &mut Expectation
Just like
Expectation::returning_st
sourcepub fn times<MockallR>(&mut self, __mockall_r: MockallR) -> &mut Expectationwhere
MockallR: Into<TimesRange>,
pub fn times<MockallR>(&mut self, __mockall_r: MockallR) -> &mut Expectationwhere
MockallR: Into<TimesRange>,
Just like
Expectation::times
sourcepub fn with<MockallMatcher0: Predicate<i32> + Send + 'static>(
&mut self,
x: MockallMatcher0,
) -> &mut Expectation
pub fn with<MockallMatcher0: Predicate<i32> + Send + 'static>( &mut self, x: MockallMatcher0, ) -> &mut Expectation
Just like
Expectation::with
sourcepub fn withf<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
pub fn withf<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
Just like
Expectation::withf
sourcepub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
pub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation
Just like
Expectation::withf_st
Auto Trait Implementations§
impl<'__mockall_lt> Freeze for ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> RefUnwindSafe for ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> !Send for ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> Sync for ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> Unpin for ExpectationGuard<'__mockall_lt>
impl<'__mockall_lt> UnwindSafe for ExpectationGuard<'__mockall_lt>
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