Trait zarrs::array::data_type::DataTypeExtension

source ·
pub trait DataTypeExtension:
    DynClone
    + Debug
    + Send
    + Sync {
    // Required methods
    fn identifier(&self) -> &'static str;
    fn name(&self) -> String;
    fn size(&self) -> DataTypeSize;
    fn metadata(&self) -> MetadataV3;
    fn fill_value_from_metadata(
        &self,
        fill_value: &FillValueMetadata,
    ) -> Result<FillValue, IncompatibleFillValueMetadataError>;
    fn metadata_fill_value(&self, fill_value: &FillValue) -> FillValueMetadata;
}
Expand description

Extension data type traits.

Required Methods§

source

fn identifier(&self) -> &'static str

Returns the identifier.

source

fn name(&self) -> String

Returns the name.

source

fn size(&self) -> DataTypeSize

Returns the data type size in bytes.

source

fn metadata(&self) -> MetadataV3

Returns the data type metadata.

source

fn fill_value_from_metadata( &self, fill_value: &FillValueMetadata, ) -> Result<FillValue, IncompatibleFillValueMetadataError>

Create a fill value from metadata.

§Errors

Returns IncompatibleFillValueMetadataError if the fill value is incompatible with the data type.

source

fn metadata_fill_value(&self, fill_value: &FillValue) -> FillValueMetadata

Return the fill value metadata.

Implementors§