pub struct MockBackendReceiver { /* private fields */ }
Expand description
The receiver half of the mock backend.
Trait Implementations§
Source§impl BackendReceiver for MockBackendReceiver
impl BackendReceiver for MockBackendReceiver
Source§fn receive(
&self,
) -> Pin<Box<dyn Future<Output = Option<Result<Vec<u8>, BackendError>>> + Send + 'static>>
fn receive( &self, ) -> Pin<Box<dyn Future<Output = Option<Result<Vec<u8>, BackendError>>> + Send + 'static>>
Hand back the next message each time it’s called. If this emits a
BackendError
, we’ll
stop asking for messages. If it emits None
, then the connection has been closed gracefully.
The bytes given back should deserialize to a valid JSON-RPC object.Auto Trait Implementations§
impl Freeze for MockBackendReceiver
impl RefUnwindSafe for MockBackendReceiver
impl Send for MockBackendReceiver
impl Sync for MockBackendReceiver
impl Unpin for MockBackendReceiver
impl UnwindSafe for MockBackendReceiver
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