Crate hdf5 [−] [src]
Interface to HDF5.
Example
extern crate hdf5; use hdf5::File; let path = "data.h5"; let mut file = File::new(path).unwrap(); file.write("foo", 42).unwrap(); file.write("bar", &vec![42.0, 69.0]).unwrap();
Complex structures can be written using rustc-serialize
as follows:
extern crate hdf5; extern crate rustc_serialize; use hdf5::File; #[derive(RustcEncodable)] struct Foo { bar: Vec<f64>, baz: Baz, } #[derive(RustcEncodable)] struct Baz { qux: f64, } let foo = Foo { bar: vec![42.0], baz: Baz { qux: 69.0, }, }; let path = "data.h5"; let mut file = File::new(path).unwrap(); file.encode("foo", &foo).unwrap();
Structs
Datatype |
A datatype. |
Encoder |
An encoder. |
Error |
An error. |
File |
A file. |
Slice |
A slice. |
Writer |
A writer. |
Traits
Data |
A type suitable for storing. |
Identity |
A type having an identifier. |
IntoData |
A type capable of converting into data. |
Location |
A type representing a location. |
Functions
version |
Return the version number of HDF5. |
Type Definitions
ID |
An identifier. |
Result |
A result. |