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§
sourcefn identifier(&self) -> &'static str
fn identifier(&self) -> &'static str
Returns the identifier.
sourcefn size(&self) -> DataTypeSize
fn size(&self) -> DataTypeSize
Returns the data type size in bytes.
sourcefn metadata(&self) -> MetadataV3
fn metadata(&self) -> MetadataV3
Returns the data type metadata.
sourcefn fill_value_from_metadata(
&self,
fill_value: &FillValueMetadata,
) -> Result<FillValue, IncompatibleFillValueMetadataError>
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.
sourcefn metadata_fill_value(&self, fill_value: &FillValue) -> FillValueMetadata
fn metadata_fill_value(&self, fill_value: &FillValue) -> FillValueMetadata
Return the fill value metadata.