pub struct MockEnv { /* private fields */ }
Implementations§
source§impl MockEnv
impl MockEnv
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
source§impl MockEnv
impl MockEnv
sourcepub fn expect_all(&mut self) -> &mut Expectation
pub fn expect_all(&mut self) -> &mut Expectation
Create an Expectation
for mocking the all
method
sourcepub fn expect_bool(&mut self) -> &mut Expectation
pub fn expect_bool(&mut self) -> &mut Expectation
Create an Expectation
for mocking the bool
method
sourcepub fn expect_char(&mut self) -> &mut Expectation
pub fn expect_char(&mut self) -> &mut Expectation
Create an Expectation
for mocking the char
method
sourcepub fn expect_f32(&mut self) -> &mut Expectation
pub fn expect_f32(&mut self) -> &mut Expectation
Create an Expectation
for mocking the f32
method
sourcepub fn expect_f64(&mut self) -> &mut Expectation
pub fn expect_f64(&mut self) -> &mut Expectation
Create an Expectation
for mocking the f64
method
sourcepub fn expect_i8(&mut self) -> &mut Expectation
pub fn expect_i8(&mut self) -> &mut Expectation
Create an Expectation
for mocking the i8
method
sourcepub fn expect_i16(&mut self) -> &mut Expectation
pub fn expect_i16(&mut self) -> &mut Expectation
Create an Expectation
for mocking the i16
method
sourcepub fn expect_i32(&mut self) -> &mut Expectation
pub fn expect_i32(&mut self) -> &mut Expectation
Create an Expectation
for mocking the i32
method
sourcepub fn expect_i64(&mut self) -> &mut Expectation
pub fn expect_i64(&mut self) -> &mut Expectation
Create an Expectation
for mocking the i64
method
sourcepub fn expect_i128(&mut self) -> &mut Expectation
pub fn expect_i128(&mut self) -> &mut Expectation
Create an Expectation
for mocking the i128
method
sourcepub fn expect_ip_addr(&mut self) -> &mut Expectation
pub fn expect_ip_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the ip_addr
method
sourcepub fn expect_ipv4_addr(&mut self) -> &mut Expectation
pub fn expect_ipv4_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the ipv4_addr
method
sourcepub fn expect_ipv6_addr(&mut self) -> &mut Expectation
pub fn expect_ipv6_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the ipv6_addr
method
sourcepub fn expect_isize(&mut self) -> &mut Expectation
pub fn expect_isize(&mut self) -> &mut Expectation
Create an Expectation
for mocking the isize
method
sourcepub fn expect_non_zero_i8(&mut self) -> &mut Expectation
pub fn expect_non_zero_i8(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_i8
method
sourcepub fn expect_non_zero_i16(&mut self) -> &mut Expectation
pub fn expect_non_zero_i16(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_i16
method
sourcepub fn expect_non_zero_i32(&mut self) -> &mut Expectation
pub fn expect_non_zero_i32(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_i32
method
sourcepub fn expect_non_zero_i64(&mut self) -> &mut Expectation
pub fn expect_non_zero_i64(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_i64
method
sourcepub fn expect_non_zero_i128(&mut self) -> &mut Expectation
pub fn expect_non_zero_i128(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_i128
method
sourcepub fn expect_non_zero_isize(&mut self) -> &mut Expectation
pub fn expect_non_zero_isize(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_isize
method
sourcepub fn expect_non_zero_u8(&mut self) -> &mut Expectation
pub fn expect_non_zero_u8(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_u8
method
sourcepub fn expect_non_zero_u16(&mut self) -> &mut Expectation
pub fn expect_non_zero_u16(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_u16
method
sourcepub fn expect_non_zero_u32(&mut self) -> &mut Expectation
pub fn expect_non_zero_u32(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_u32
method
sourcepub fn expect_non_zero_u64(&mut self) -> &mut Expectation
pub fn expect_non_zero_u64(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_u64
method
sourcepub fn expect_non_zero_u128(&mut self) -> &mut Expectation
pub fn expect_non_zero_u128(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_u128
method
sourcepub fn expect_non_zero_usize(&mut self) -> &mut Expectation
pub fn expect_non_zero_usize(&mut self) -> &mut Expectation
Create an Expectation
for mocking the non_zero_usize
method
sourcepub fn expect_os_string(&mut self) -> &mut Expectation
pub fn expect_os_string(&mut self) -> &mut Expectation
Create an Expectation
for mocking the os_string
method
sourcepub fn expect_path_buf(&mut self) -> &mut Expectation
pub fn expect_path_buf(&mut self) -> &mut Expectation
Create an Expectation
for mocking the path_buf
method
sourcepub fn expect_raw(&mut self) -> &mut Expectation
pub fn expect_raw(&mut self) -> &mut Expectation
Create an Expectation
for mocking the raw
method
sourcepub fn expect_socket_addr(&mut self) -> &mut Expectation
pub fn expect_socket_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the socket_addr
method
sourcepub fn expect_socket_addr_v4(&mut self) -> &mut Expectation
pub fn expect_socket_addr_v4(&mut self) -> &mut Expectation
Create an Expectation
for mocking the socket_addr_v4
method
sourcepub fn expect_socket_addr_v6(&mut self) -> &mut Expectation
pub fn expect_socket_addr_v6(&mut self) -> &mut Expectation
Create an Expectation
for mocking the socket_addr_v6
method
sourcepub fn expect_string(&mut self) -> &mut Expectation
pub fn expect_string(&mut self) -> &mut Expectation
Create an Expectation
for mocking the string
method
sourcepub fn expect_strings(&mut self) -> &mut Expectation
pub fn expect_strings(&mut self) -> &mut Expectation
Create an Expectation
for mocking the strings
method
sourcepub fn expect_u8(&mut self) -> &mut Expectation
pub fn expect_u8(&mut self) -> &mut Expectation
Create an Expectation
for mocking the u8
method
sourcepub fn expect_u16(&mut self) -> &mut Expectation
pub fn expect_u16(&mut self) -> &mut Expectation
Create an Expectation
for mocking the u16
method
sourcepub fn expect_u32(&mut self) -> &mut Expectation
pub fn expect_u32(&mut self) -> &mut Expectation
Create an Expectation
for mocking the u32
method
sourcepub fn expect_u64(&mut self) -> &mut Expectation
pub fn expect_u64(&mut self) -> &mut Expectation
Create an Expectation
for mocking the u64
method
sourcepub fn expect_u128(&mut self) -> &mut Expectation
pub fn expect_u128(&mut self) -> &mut Expectation
Create an Expectation
for mocking the u128
method
sourcepub fn expect_usize(&mut self) -> &mut Expectation
pub fn expect_usize(&mut self) -> &mut Expectation
Create an Expectation
for mocking the usize
method