Expand description
HDF5 file handle — the main entry point for the public API.
use rust_hdf5::H5File;
// Write
let file = H5File::create("example.h5").unwrap();
let ds = file.new_dataset::<u8>().shape(&[10, 20]).create("data").unwrap();
ds.write_raw(&vec![0u8; 200]).unwrap();
drop(file);
// Read
let file = H5File::open("example.h5").unwrap();
let ds = file.dataset("data").unwrap();
let data = ds.read_raw::<u8>().unwrap();
assert_eq!(data.len(), 200);Structs§
- H5File
- An HDF5 file opened for reading or writing.