1 2 3 4 5 6 7 8
use crate::error::Error;
use std::future::Future;
use std::pin::Pin;
pub type Result<T> = std::result::Result<T, Error>;
pub type AsyncResult<'a, R> = Pin<Box<dyn 'a + Future<Output = Result<R>> + Send>>;
pub type Async<'a, R> = Pin<Box<dyn 'a + Future<Output = R> + Send>>;