pub struct MockMemoryOps { /* private fields */ }Implementations§
Source§impl MockMemoryOps
impl MockMemoryOps
pub fn load8(&self, addr: usize) -> u8
pub fn load16(&self, addr: usize) -> u16
pub fn load32(&self, addr: usize) -> u32
pub fn load64(&self, addr: usize) -> u64
pub fn store8(&self, addr: usize, value: u8)
pub fn store16(&self, addr: usize, value: u16)
pub fn store32(&self, addr: usize, value: u32)
pub fn store64(&self, addr: usize, value: u64)
pub fn write_barrier(&self)
Sourcepub fn expect_load8(&mut self) -> &mut Expectation
pub fn expect_load8(&mut self) -> &mut Expectation
Create an Expectation for mocking the load8 method
Sourcepub fn expect_load16(&mut self) -> &mut Expectation
pub fn expect_load16(&mut self) -> &mut Expectation
Create an Expectation for mocking the load16 method
Sourcepub fn expect_load32(&mut self) -> &mut Expectation
pub fn expect_load32(&mut self) -> &mut Expectation
Create an Expectation for mocking the load32 method
Sourcepub fn expect_load64(&mut self) -> &mut Expectation
pub fn expect_load64(&mut self) -> &mut Expectation
Create an Expectation for mocking the load64 method
Sourcepub fn expect_store8(&mut self) -> &mut Expectation
pub fn expect_store8(&mut self) -> &mut Expectation
Create an Expectation for mocking the store8 method
Sourcepub fn expect_store16(&mut self) -> &mut Expectation
pub fn expect_store16(&mut self) -> &mut Expectation
Create an Expectation for mocking the store16 method
Sourcepub fn expect_store32(&mut self) -> &mut Expectation
pub fn expect_store32(&mut self) -> &mut Expectation
Create an Expectation for mocking the store32 method
Sourcepub fn expect_store64(&mut self) -> &mut Expectation
pub fn expect_store64(&mut self) -> &mut Expectation
Create an Expectation for mocking the store64 method
Sourcepub fn expect_write_barrier(&mut self) -> &mut Expectation
pub fn expect_write_barrier(&mut self) -> &mut Expectation
Create an Expectation for mocking the write_barrier method
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
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