pub struct ExpectationGuard<'__mockall_lt> {
guard: MutexGuard<'__mockall_lt, Expectations>,
i: usize,
}Expand description
Like an &Expectation but
protected by a Mutex guard. Useful for mocking static
methods. Forwards accesses to an Expectation object.
Fields§
§guard: MutexGuard<'__mockall_lt, Expectations>§i: usizeImplementations§
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 Expectationwhere
MockallF: FnMut(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + Send + 'static,
pub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectationwhere
MockallF: FnMut(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + Send + 'static,
Just like
Expectation::returning
sourcepub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnOnce(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + Send + 'static,
pub fn return_once<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnOnce(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + Send + 'static,
Just like
Expectation::return_once
sourcepub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnOnce(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + 'static,
pub fn return_once_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnOnce(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + 'static,
Just like
Expectation::return_once_st
sourcepub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnMut(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + 'static,
pub fn returning_st<MockallF>(
&mut self,
__mockall_f: MockallF,
) -> &mut Expectationwhere
MockallF: FnMut(&BrowserProfileFullData, StartRequest, String) -> AppResult<BrowserProfileConfig> + '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<BrowserProfileFullData> + Send + 'static, MockallMatcher1: Predicate<StartRequest> + Send + 'static, MockallMatcher2: Predicate<String> + Send + 'static>(
&mut self,
bp: MockallMatcher0,
request: MockallMatcher1,
token: MockallMatcher2,
) -> &mut Expectation
pub fn with<MockallMatcher0: Predicate<BrowserProfileFullData> + Send + 'static, MockallMatcher1: Predicate<StartRequest> + Send + 'static, MockallMatcher2: Predicate<String> + Send + 'static>( &mut self, bp: MockallMatcher0, request: MockallMatcher1, token: MockallMatcher2, ) -> &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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.