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§
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>>
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 Methods§
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.