Skip to main content

IOExt

Trait IOExt 

Source
pub trait IOExt {
    // Required methods
    fn block<T>(&self, f: impl FnMut() -> Result<IOResult<T>>) -> Result<T>;
    fn wait<T, F>(&self, f: F) -> impl Future<Output = Result<T>> + Send
       where F: FnMut() -> Result<IOResult<T>> + Send,
             T: Send;
}

Required Methods§

Source

fn block<T>(&self, f: impl FnMut() -> Result<IOResult<T>>) -> Result<T>

Source

fn wait<T, F>(&self, f: F) -> impl Future<Output = Result<T>> + Send
where F: FnMut() -> Result<IOResult<T>> + Send, T: Send,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<I: ?Sized + IO> IOExt for I