Struct wasmtime_wasi::preview2::pipe::SinkOutputStream
source · pub struct SinkOutputStream;
Expand description
An output stream that consumes all input written to it, and is always ready.
Trait Implementations§
source§impl HostOutputStream for SinkOutputStream
impl HostOutputStream for SinkOutputStream
source§fn write(&mut self, buf: Bytes) -> Result<(usize, StreamState), Error>
fn write(&mut self, buf: Bytes) -> Result<(usize, StreamState), Error>
Write bytes. On success, returns the number of bytes written.
Important: this write must be non-blocking!
source§fn ready<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ready<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Check for write readiness: this method blocks until the stream is
ready for writing.
source§fn splice(
&mut self,
src: &mut dyn HostInputStream,
nelem: usize
) -> Result<(usize, StreamState), Error>
fn splice( &mut self, src: &mut dyn HostInputStream, nelem: usize ) -> Result<(usize, StreamState), Error>
Transfer bytes directly from an input stream to an output stream.
Important: this splice must be non-blocking!
source§fn write_zeroes(&mut self, nelem: usize) -> Result<(usize, StreamState), Error>
fn write_zeroes(&mut self, nelem: usize) -> Result<(usize, StreamState), Error>
Repeatedly write a byte to a stream. Important: this write must be
non-blocking!
Auto Trait Implementations§
impl RefUnwindSafe for SinkOutputStream
impl Send for SinkOutputStream
impl Sync for SinkOutputStream
impl Unpin for SinkOutputStream
impl UnwindSafe for SinkOutputStream
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more