Trait wasmtime_wasi::preview2::HostInputStream
source · pub trait HostInputStream: Send + Sync {
// Required methods
fn read(&mut self, size: usize) -> Result<(Bytes, StreamState), Error>;
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;
// Provided method
fn skip(&mut self, nelem: usize) -> Result<(usize, StreamState), Error> { ... }
}
Expand description
Host trait for implementing the wasi:io/streams.input-stream
resource: A
bytestream which can be read from.