pub struct MockStream { /* private fields */ }Available on crate feature
async-futures only.Expand description
Asynchronous mock IO stream
Implementations§
Trait Implementations§
Source§impl AsyncRead for MockStream
impl AsyncRead for MockStream
Source§impl AsyncWrite for MockStream
impl AsyncWrite for MockStream
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf into the object. Read moreSource§fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
Source§impl Debug for MockStream
impl Debug for MockStream
impl<'__pin> Unpin for MockStreamwhere
PinnedFieldsOf<__Origin<'__pin>>: Unpin,
Auto Trait Implementations§
impl Freeze for MockStream
impl RefUnwindSafe for MockStream
impl Send for MockStream
impl Sync for MockStream
impl UnwindSafe for MockStream
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