hdf5 0.8.1

Thread-safe Rust bindings for the HDF5 library.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[test]
fn roundtrip_compound_type() {
    use hdf5::H5Type;
    #[derive(H5Type)]
    #[repr(C)]
    struct Compound {
        a: u8,
        b: u8,
    }

    let dt = hdf5::Datatype::from_type::<Compound>().unwrap();
    let td = dt.to_descriptor().unwrap();
    assert_eq!(td, Compound::type_descriptor());
}