Skip to main content

H5Type

Trait H5Type 

Source
pub trait H5Type:
    Sized
    + Copy
    + 'static {
    // Required methods
    fn hdf5_type() -> DatatypeMessage;
    fn element_size() -> usize;
}
Expand description

Trait for Rust types that have a corresponding HDF5 datatype.

Implement this for any Copy + 'static type that can be stored in an HDF5 dataset. The library provides implementations for all standard numeric types.

Required Methods§

Source

fn hdf5_type() -> DatatypeMessage

Return the HDF5 datatype message describing this type.

Source

fn element_size() -> usize

Return the size of a single element in bytes.

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.

Implementations on Foreign Types§

Source§

impl H5Type for f32

Source§

impl H5Type for f64

Source§

impl H5Type for i8

Source§

impl H5Type for i16

Source§

impl H5Type for i32

Source§

impl H5Type for i64

Source§

impl H5Type for u8

Source§

impl H5Type for u16

Source§

impl H5Type for u32

Source§

impl H5Type for u64

Implementors§