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]
impl PlatformSpecificAsyncIoEnvpub fn new(remote: Remote, fallback_num_threads: Option<usize>) -> Self[src]
pub fn new(remote: Remote, fallback_num_threads: Option<usize>) -> SelfCreates 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 Debug for PlatformSpecificAsyncIoEnvfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for PlatformSpecificAsyncIoEnv[src]
impl Clone for PlatformSpecificAsyncIoEnvfn clone(&self) -> PlatformSpecificAsyncIoEnv[src]
fn clone(&self) -> PlatformSpecificAsyncIoEnvReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl SubEnvironment for PlatformSpecificAsyncIoEnv[src]
impl SubEnvironment for PlatformSpecificAsyncIoEnvfn sub_env(&self) -> Self[src]
fn sub_env(&self) -> SelfCreate 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]
impl AsyncIoEnvironment for PlatformSpecificAsyncIoEnvtype 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]
fn read_async(&mut self, fd: FileDesc) -> Self::ReadCreates a futures-aware adapter to read data from a FileDesc asynchronously.
fn write_all(&mut self, fd: FileDesc, data: Vec<u8>) -> Self::WriteAll[src]
fn write_all(&mut self, fd: FileDesc, data: Vec<u8>) -> Self::WriteAllCreates a future for writing data into a FileDesc.
fn write_all_best_effort(&mut self, fd: FileDesc, data: Vec<u8>)[src]
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). Read more
Auto Trait Implementations
impl Send for PlatformSpecificAsyncIoEnv
impl Send for PlatformSpecificAsyncIoEnvimpl Sync for PlatformSpecificAsyncIoEnv
impl Sync for PlatformSpecificAsyncIoEnv