pub trait HostWithStore: HasData + Send {
// Required method
fn read_via_stream<T>(
accessor: &Accessor<T, Self>,
) -> impl Future<Output = Result<(StreamReader<u8>, FutureReader<Result<(), ErrorCode>>)>> + Send;
}
Available on crate feature
p3
only.Required Methods§
Sourcefn read_via_stream<T>(
accessor: &Accessor<T, Self>,
) -> impl Future<Output = Result<(StreamReader<u8>, FutureReader<Result<(), ErrorCode>>)>> + Send
fn read_via_stream<T>( accessor: &Accessor<T, Self>, ) -> impl Future<Output = Result<(StreamReader<u8>, FutureReader<Result<(), ErrorCode>>)>> + Send
Return a stream for reading from stdin.
This function returns a stream which provides data read from stdin, and a future to signal read results.
If the stream’s readable end is dropped the future will resolve to success.
If the stream’s writable end is dropped the future will either resolve to success if stdin was closed by the writer or to an error-code if reading failed for some other reason.
Multiple streams may be active at the same time. The behavior of concurrent reads is implementation-specific.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.