Skip to main content

MockMemoryOps

Struct MockMemoryOps 

Source
pub struct MockMemoryOps { /* private fields */ }

Implementations§

Source§

impl MockMemoryOps

Source

pub fn load8(&self, addr: usize) -> u8

Source

pub fn load16(&self, addr: usize) -> u16

Source

pub fn load32(&self, addr: usize) -> u32

Source

pub fn load64(&self, addr: usize) -> u64

Source

pub fn store8(&self, addr: usize, value: u8)

Source

pub fn store16(&self, addr: usize, value: u16)

Source

pub fn store32(&self, addr: usize, value: u32)

Source

pub fn store64(&self, addr: usize, value: u64)

Source

pub fn write_barrier(&self)

Source

pub fn expect_load8(&mut self) -> &mut Expectation

Create an Expectation for mocking the load8 method

Source

pub fn expect_load16(&mut self) -> &mut Expectation

Create an Expectation for mocking the load16 method

Source

pub fn expect_load32(&mut self) -> &mut Expectation

Create an Expectation for mocking the load32 method

Source

pub fn expect_load64(&mut self) -> &mut Expectation

Create an Expectation for mocking the load64 method

Source

pub fn expect_store8(&mut self) -> &mut Expectation

Create an Expectation for mocking the store8 method

Source

pub fn expect_store16(&mut self) -> &mut Expectation

Create an Expectation for mocking the store16 method

Source

pub fn expect_store32(&mut self) -> &mut Expectation

Create an Expectation for mocking the store32 method

Source

pub fn expect_store64(&mut self) -> &mut Expectation

Create an Expectation for mocking the store64 method

Source

pub fn expect_write_barrier(&mut self) -> &mut Expectation

Create an Expectation for mocking the write_barrier method

Source

pub fn checkpoint(&mut self)

Validate that all current expectations for all methods have been satisfied, and discard them.

Source

pub fn new() -> Self

Create a new mock object with no expectations.

This method will not be generated if the real struct already has a new method. However, it will be generated if the struct implements a trait with a new method. The trait’s new method can still be called like <MockX as TraitY>::new

Trait Implementations§

Source§

impl Default for MockMemoryOps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.