Struct mockall::examples::mock_ffi::__ffi_func::ExpectationGuard[][src]

pub struct ExpectationGuard<'__mockall_lt> { /* fields omitted */ }
👎 Deprecated since 0.9.0:

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]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn never(&mut self) -> &mut Expectation[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn once(&mut self) -> &mut Expectation[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn return_const<MockallOutput>(
    &mut self,
    __mockall_c: MockallOutput
) -> &mut Expectation where
    MockallOutput: Clone + Into<()> + Send + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn return_const_st<MockallOutput>(
    &mut self,
    __mockall_c: MockallOutput
) -> &mut Expectation where
    MockallOutput: Clone + Into<()> + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn returning<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
    MockallF: FnMut() + Send + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn return_once<MockallF>(
    &mut self,
    __mockall_f: MockallF
) -> &mut Expectation where
    MockallF: FnOnce() + Send + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn return_once_st<MockallF>(
    &mut self,
    __mockall_f: MockallF
) -> &mut Expectation where
    MockallF: FnOnce() + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn returning_st<MockallF>(
    &mut self,
    __mockall_f: MockallF
) -> &mut Expectation where
    MockallF: FnMut() + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn times<MockallR>(&mut self, __mockall_r: MockallR) -> &mut Expectation where
    MockallR: Into<TimesRange>, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn with(&mut self) -> &mut Expectation[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn withf<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
    MockallF: Fn() -> bool + Send + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

pub fn withf_st<MockallF>(&mut self, __mockall_f: MockallF) -> &mut Expectation where
    MockallF: Fn() -> bool + 'static, 
[src]

👎 Deprecated since 0.9.0:

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 ... } }

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]

impl<T> Any for T where
    T: Any + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.