pub struct MockKeyStore { /* private fields */ }
Implementations§
Source§impl MockKeyStore
impl MockKeyStore
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 MockKeyStore
impl MockKeyStore
Sourcepub fn expect_add_signing_key(&mut self) -> &mut Expectation
pub fn expect_add_signing_key(&mut self) -> &mut Expectation
Create an Expectation
for mocking the add_signing_key
method
Sourcepub fn expect_get_signing_key(&mut self) -> &mut Expectation
pub fn expect_get_signing_key(&mut self) -> &mut Expectation
Create an Expectation
for mocking the get_signing_key
method
Sourcepub fn expect_get_or_create_signing_key(&mut self) -> &mut Expectation
pub fn expect_get_or_create_signing_key(&mut self) -> &mut Expectation
Create an Expectation
for mocking the get_or_create_signing_key
method
Trait Implementations§
Source§impl Debug for MockKeyStore
impl Debug for MockKeyStore
Source§impl Default for MockKeyStore
impl Default for MockKeyStore
Source§impl KeyStore for MockKeyStore
impl KeyStore for MockKeyStore
fn add_signing_key(&self, id: &str, signing_key: &SigningKey) -> Result<()>
fn get_signing_key(&self, id: &str) -> Result<SigningKey>
fn get_or_create_signing_key(&self, id: &str) -> Result<SigningKey>
Auto Trait Implementations§
impl Freeze for MockKeyStore
impl RefUnwindSafe for MockKeyStore
impl Send for MockKeyStore
impl Sync for MockKeyStore
impl Unpin for MockKeyStore
impl UnwindSafe for MockKeyStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more