pub struct MockDecoder<'id> { /* private fields */ }Available on crate feature
test-utils only.Expand description
The decoder of MockScript: each scripted step is
written through the completion writer.
Trait Implementations§
Source§impl<'id> Decoder<'id, Completion, MockFrame> for MockDecoder<'id>
impl<'id> Decoder<'id, Completion, MockFrame> for MockDecoder<'id>
Source§fn classify(&self, frame: MockFrame) -> WireEvent<MockFrame>
fn classify(&self, frame: MockFrame) -> WireEvent<MockFrame>
Decode and classify one frame. A JSON wire MUST delegate to a
classifier in
crate::providers::internal::wire, so the
decode-then-validate policy is not re-derived per provider.Source§fn decode(
&mut self,
frame: MockFrame,
out: Out<'id, Completion>,
) -> Result<Flow, ProviderError>
fn decode( &mut self, frame: MockFrame, out: Out<'id, Completion>, ) -> Result<Flow, ProviderError>
Write one
Known event into the reply. An error ends the reply with
it.Source§impl<'id> Default for MockDecoder<'id>
impl<'id> Default for MockDecoder<'id>
Source§fn default() -> MockDecoder<'id>
fn default() -> MockDecoder<'id>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'id> Freeze for MockDecoder<'id>
impl<'id> RefUnwindSafe for MockDecoder<'id>
impl<'id> Send for MockDecoder<'id>
impl<'id> Sync for MockDecoder<'id>
impl<'id> Unpin for MockDecoder<'id>
impl<'id> UnsafeUnpin for MockDecoder<'id>
impl<'id> UnwindSafe for MockDecoder<'id>
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