pub struct MockSnapshotPolicy { /* private fields */ }Implementations§
Source§impl MockSnapshotPolicy
impl MockSnapshotPolicy
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 MockSnapshotPolicy
impl MockSnapshotPolicy
Sourcepub fn expect_should_trigger(&mut self) -> &mut Expectation
pub fn expect_should_trigger(&mut self) -> &mut Expectation
Create an Expectation for mocking the should_trigger method
Sourcepub fn expect_mark_snapshot_created(&mut self) -> &mut Expectation
pub fn expect_mark_snapshot_created(&mut self) -> &mut Expectation
Create an Expectation for mocking the mark_snapshot_created method
Trait Implementations§
Source§impl Debug for MockSnapshotPolicy
impl Debug for MockSnapshotPolicy
Source§impl Default for MockSnapshotPolicy
impl Default for MockSnapshotPolicy
Source§impl SnapshotPolicy for MockSnapshotPolicy
impl SnapshotPolicy for MockSnapshotPolicy
Source§fn mark_snapshot_created(&mut self)
fn mark_snapshot_created(&mut self)
Should be called after the snapshot is created successfully
fn should_trigger(&self, ctx: &SnapshotContext) -> bool
Auto Trait Implementations§
impl Freeze for MockSnapshotPolicy
impl RefUnwindSafe for MockSnapshotPolicy
impl Send for MockSnapshotPolicy
impl Sync for MockSnapshotPolicy
impl Unpin for MockSnapshotPolicy
impl UnwindSafe for MockSnapshotPolicy
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request