Trait N5AsyncReader

Source
pub trait N5AsyncReader {
    // Required methods
    fn get_version(&self) -> Box<dyn Future<Item = Version, Error = Error>>;
    fn get_dataset_attributes(
        &self,
        path_name: &str,
    ) -> Box<dyn Future<Item = DatasetAttributes, Error = Error>>;
    fn exists(
        &self,
        path_name: &str,
    ) -> Box<dyn Future<Item = bool, Error = Error>>;
    fn read_block<T>(
        &self,
        path_name: &str,
        data_attrs: &DatasetAttributes,
        grid_position: Vec<i64>,
    ) -> Box<dyn Future<Item = Option<VecDataBlock<T>>, Error = Error>>
       where DataType: DataBlockCreator<T>,
             VecDataBlock<T>: DataBlock<T>,
             T: Clone + 'static;
    fn list(
        &self,
        path_name: &str,
    ) -> Box<dyn Future<Item = Vec<String>, Error = Error>>;
    fn list_attributes(
        &self,
        path_name: &str,
    ) -> Box<dyn Future<Item = Value, Error = Error>>;

    // Provided method
    fn dataset_exists(
        &self,
        path_name: &str,
    ) -> Box<dyn Future<Item = bool, Error = Error>> { ... }
}
Expand description

This trait exists to preserve type information between calls (rather than erasing it with Promise) and for easier potential future compatibility with an N5 core async trait.

Required Methods§

Source

fn get_version(&self) -> Box<dyn Future<Item = Version, Error = Error>>

Source

fn get_dataset_attributes( &self, path_name: &str, ) -> Box<dyn Future<Item = DatasetAttributes, Error = Error>>

Source

fn exists(&self, path_name: &str) -> Box<dyn Future<Item = bool, Error = Error>>

Source

fn read_block<T>( &self, path_name: &str, data_attrs: &DatasetAttributes, grid_position: Vec<i64>, ) -> Box<dyn Future<Item = Option<VecDataBlock<T>>, Error = Error>>
where DataType: DataBlockCreator<T>, VecDataBlock<T>: DataBlock<T>, T: Clone + 'static,

Source

fn list( &self, path_name: &str, ) -> Box<dyn Future<Item = Vec<String>, Error = Error>>

Source

fn list_attributes( &self, path_name: &str, ) -> Box<dyn Future<Item = Value, Error = Error>>

Provided Methods§

Source

fn dataset_exists( &self, path_name: &str, ) -> Box<dyn Future<Item = bool, Error = Error>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§