Struct mockable::MockMetadata
source · pub struct MockMetadata { /* private fields */ }Expand description
mockall implementation of Metadata.
This is supported on feature=mock only.
Implementations§
source§impl MockMetadata
impl MockMetadata
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 MockMetadata
impl MockMetadata
sourcepub fn expect_accessed(&mut self) -> &mut Expectation
pub fn expect_accessed(&mut self) -> &mut Expectation
Create an Expectation for mocking the accessed method
sourcepub fn expect_created(&mut self) -> &mut Expectation
pub fn expect_created(&mut self) -> &mut Expectation
Create an Expectation for mocking the created method
sourcepub fn expect_into_metadata(&mut self) -> &mut Expectation
pub fn expect_into_metadata(&mut self) -> &mut Expectation
Create an Expectation for mocking the into_metadata method
sourcepub fn expect_is_dir(&mut self) -> &mut Expectation
pub fn expect_is_dir(&mut self) -> &mut Expectation
Create an Expectation for mocking the is_dir method
sourcepub fn expect_is_file(&mut self) -> &mut Expectation
pub fn expect_is_file(&mut self) -> &mut Expectation
Create an Expectation for mocking the is_file method
sourcepub fn expect_is_symlink(&mut self) -> &mut Expectation
pub fn expect_is_symlink(&mut self) -> &mut Expectation
Create an Expectation for mocking the is_symlink method
sourcepub fn expect_len(&mut self) -> &mut Expectation
pub fn expect_len(&mut self) -> &mut Expectation
Create an Expectation for mocking the len method
sourcepub fn expect_modified(&mut self) -> &mut Expectation
pub fn expect_modified(&mut self) -> &mut Expectation
Create an Expectation for mocking the modified method
sourcepub fn expect_permissions(&mut self) -> &mut Expectation
pub fn expect_permissions(&mut self) -> &mut Expectation
Create an Expectation for mocking the permissions method
sourcepub fn expect_to_metadata(&mut self) -> &mut Expectation
pub fn expect_to_metadata(&mut self) -> &mut Expectation
Create an Expectation for mocking the to_metadata method
Trait Implementations§
source§impl Default for MockMetadata
impl Default for MockMetadata
source§impl Metadata for MockMetadata
impl Metadata for MockMetadata
source§fn accessed(&self) -> Result<SystemTime>
fn accessed(&self) -> Result<SystemTime>
std::fs::Metadata::accessed for more details.source§fn created(&self) -> Result<SystemTime>
fn created(&self) -> Result<SystemTime>
std::fs::Metadata::created for more details.source§fn into_metadata(self: Box<MockMetadata>) -> Metadata
fn into_metadata(self: Box<MockMetadata>) -> Metadata
std::fs::Metadata instance.source§fn is_dir(&self) -> bool
fn is_dir(&self) -> bool
std::fs::Metadata::is_dir for more details.source§fn is_file(&self) -> bool
fn is_file(&self) -> bool
std::fs::Metadata::is_file for more details.source§fn is_symlink(&self) -> bool
fn is_symlink(&self) -> bool
std::fs::Metadata::is_symlink for more details.source§fn len(&self) -> u64
fn len(&self) -> u64
std::fs::Metadata::len for more details.source§fn modified(&self) -> Result<SystemTime>
fn modified(&self) -> Result<SystemTime>
std::fs::Metadata::modified for more details.source§fn permissions(&self) -> Box<dyn Permissions>
fn permissions(&self) -> Box<dyn Permissions>
std::fs::Metadata::permissions for more details.source§fn to_metadata(&self) -> &Metadata
fn to_metadata(&self) -> &Metadata
std::fs::Metadata instance.