Struct conch_runtime::env::PlatformSpecificAsyncIoEnv
[−]
[src]
pub struct PlatformSpecificAsyncIoEnv { /* fields omitted */ }
A platform specific environment efficiently using a tokio
event loop,
if the current platform supports efficient async IO, or a ThreadPoolAsyncIoEnv
otherwise.
Methods
impl PlatformSpecificAsyncIoEnv
[src]
fn new(remote: Remote, fallback_num_threads: Option<usize>) -> Self
[src]
Creates a new platform specific environment using a tokio
event loop,
if such an environment is supported on the current platform.
Otherwise, we will fall back to to a ThreadPoolAsyncIoEnv
with the
specified number of threads. If None
is specified, we'll use one
thread per CPU.
Trait Implementations
impl Debug for PlatformSpecificAsyncIoEnv
[src]
impl Clone for PlatformSpecificAsyncIoEnv
[src]
fn clone(&self) -> PlatformSpecificAsyncIoEnv
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl SubEnvironment for PlatformSpecificAsyncIoEnv
[src]
fn sub_env(&self) -> Self
[src]
Create a new sub-environment, which starts out idential to its parent, but any changes on the new environment will not be reflected on the parent. Read more
impl AsyncIoEnvironment for PlatformSpecificAsyncIoEnv
[src]
type Read = PlatformSpecificRead
An async/futures-aware Read
adapter around a FileDesc
.
type WriteAll = PlatformSpecificWriteAll
An future that represents writing data into a FileDesc
.
fn read_async(&mut self, fd: FileDesc) -> Self::Read
[src]
Creates a futures-aware adapter to read data from a FileDesc
asynchronously.
fn write_all(&mut self, fd: FileDesc, data: Vec<u8>) -> Self::WriteAll
[src]
Creates a future for writing data into a FileDesc
.
fn write_all_best_effort(&mut self, fd: FileDesc, data: Vec<u8>)
[src]
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). Read more