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 Expectationwhere
MockallOutput: Clone + Into<i32> + Send + 'static,
pub fn return_const<MockallOutput>(
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectationwhere
MockallOutput: Clone + Into<i32> + Send + 'static,
Just like
Expectation::return_const
sourcepub fn return_const_st<MockallOutput>(
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectationwhere
MockallOutput: Clone + Into<i32> + 'static,
pub fn return_const_st<MockallOutput>(
&mut self,
__mockall_c: MockallOutput
) -> &mut Expectationwhere
MockallOutput: Clone + Into<i32> + 'static,
Just like
Expectation::return_const_st
sourcepub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: FnMut(i32) -> i32 + Send + 'static,
pub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: FnMut(i32) -> i32 + Send + 'static,
Just like
Expectation::returning
sourcepub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnOnce(i32) -> i32 + Send + 'static,
pub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnOnce(i32) -> i32 + Send + 'static,
Just like
Expectation::return_once
sourcepub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnOnce(i32) -> i32 + 'static,
pub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnOnce(i32) -> i32 + 'static,
Just like
Expectation::return_once_st
sourcepub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnMut(i32) -> i32 + 'static,
pub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF
) -> &mut Expectationwhere
MockallF: FnMut(i32) -> i32 + 'static,
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 Expectationwhere
MockallF: Fn(&i32) -> bool + Send + 'static,
pub fn withf<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: Fn(&i32) -> bool + Send + 'static,
Just like
Expectation::withf
sourcepub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: Fn(&i32) -> bool + 'static,
pub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: Fn(&i32) -> bool + 'static,
Just like
Expectation::withf_st