Trait AsyncTryFromFile

Source
pub trait AsyncTryFromFile {
    type Error;

    // Required method
    fn new_from_file<'life0, 'async_trait>(
        path: &'life0 Path,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for asynchronously creating Self from a filesystem path.

Required Associated Types§

Required Methods§

Source

fn new_from_file<'life0, 'async_trait>( path: &'life0 Path, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, 'life0: 'async_trait,

Asynchronously create Self by reading the file at path.

Implementors§