Trait conch_runtime::env::AsyncIoEnvironment
[−]
[src]
pub trait AsyncIoEnvironment {
type Read: AsyncRead;
type WriteAll: Future<Item = (), Error = IoError>;
fn read_async(&mut self, fd: FileDesc) -> Self::Read;
fn write_all(&mut self, fd: FileDesc, data: Vec<u8>) -> Self::WriteAll;
fn write_all_best_effort(&mut self, fd: FileDesc, data: Vec<u8>);
}An interface for performing async operations on FileDesc handles.
Associated Types
type Read: AsyncRead
An async/futures-aware Read adapter around a FileDesc.
type WriteAll: Future<Item = (), Error = IoError>
An future that represents writing data into a FileDesc.
Required Methods
fn read_async(&mut self, fd: FileDesc) -> Self::Read
Creates a futures-aware adapter to read data from a FileDesc asynchronously.
fn write_all(&mut self, fd: FileDesc, data: Vec<u8>) -> Self::WriteAll
Creates a future for writing data into a FileDesc.
fn write_all_best_effort(&mut self, fd: FileDesc, data: Vec<u8>)
Asynchronously write the contents of data to a FileDesc in the
background on a best effort basis (e.g. the implementation can give up
due to any (appropriately) unforceen errors like broken pipes).
Implementations on Foreign Types
impl<'a, T: ?Sized + AsyncIoEnvironment> AsyncIoEnvironment for &'a mut T[src]
Implementors
impl AsyncIoEnvironment for PlatformSpecificAsyncIoEnv type Read = PlatformSpecificRead; type WriteAll = PlatformSpecificWriteAll;impl AsyncIoEnvironment for ThreadPoolAsyncIoEnv type Read = ReadAsync; type WriteAll = CpuFuture<(), IoError>;impl<A, IO, FD, L, V, EX, WD, N, ERR> AsyncIoEnvironment for Env<A, IO, FD, L, V, EX, WD, N, ERR> where
IO: AsyncIoEnvironment,
N: Hash + Eq, type Read = IO::Read; type WriteAll = IO::WriteAll;impl<A, IO, FD, L, V, EX, WD, N, ERR> AsyncIoEnvironment for AtomicEnv<A, IO, FD, L, V, EX, WD, N, ERR> where
IO: AsyncIoEnvironment,
N: Hash + Eq, type Read = IO::Read; type WriteAll = IO::WriteAll;impl AsyncIoEnvironment for EventedAsyncIoEnv type Read = ReadAsync; type WriteAll = WriteAll;