Trait embedded_io::asynch::Write
source · [−]pub trait Write: Io {
type WriteFuture<'a>: Future<Output = Result<usize, Self::Error>>
where
Self: 'a;
type FlushFuture<'a>: Future<Output = Result<(), Self::Error>>
where
Self: 'a;
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>;
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>;
fn write_all<'a>(
&'a mut self,
buf: &'a [u8]
) -> impl Future<Output = Result<(), Self::Error>> { ... }
}Available on crate feature
async only.Expand description
Async writer.
Semantics are the same as std::io::Write, check its documentation for details.
Required Associated Types
Future returned by write.
Required Methods
Write a buffer into this writer, returning how many bytes were written.
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
Provided Methods
Implementors
sourceimpl<T: AsyncWrite + Unpin + ?Sized> Write for FromFutures<T>
Available on crate feature std only.
impl<T: AsyncWrite + Unpin + ?Sized> Write for FromFutures<T>
Available on crate feature
std only.