[−][src]Struct hdf5::Container
Implementations
impl Container
[src]
pub fn as_reader(&self) -> Reader
[src]
Creates a reader wrapper for this dataset/attribute, allowing to set custom type conversion options when reading.
pub fn as_writer(&self) -> Writer
[src]
Creates a writer wrapper for this dataset/attribute, allowing to set custom type conversion options when writing.
pub fn dtype(&self) -> Result<Datatype>
[src]
Returns the datatype of the dataset/attribute.
pub fn space(&self) -> Result<Dataspace>
[src]
Returns the dataspace of the dataset/attribute.
pub fn shape(&self) -> Vec<Ix>
[src]
Returns the shape of the dataset/attribute.
pub fn ndim(&self) -> usize
[src]
Returns the number of dimensions in the dataset/attribute.
pub fn size(&self) -> usize
[src]
Returns the total number of elements in the dataset/attribute.
pub fn is_scalar(&self) -> bool
[src]
Returns whether this dataset/attribute is a scalar.
pub fn storage_size(&self) -> u64
[src]
Returns the amount of file space required for the dataset/attribute. Note that this only accounts for the space which has actually been allocated (it can be equal to zero).
pub fn read<T: H5Type, D: Dimension>(&self) -> Result<Array<T, D>>
[src]
Reads a dataset/attribute into an n-dimensional array.
If the array has a fixed number of dimensions, it must match the dimensionality of the dataset/attribute.
pub fn read_raw<T: H5Type>(&self) -> Result<Vec<T>>
[src]
Reads a dataset/attribute into a vector in memory order.
pub fn read_1d<T: H5Type>(&self) -> Result<Array1<T>>
[src]
Reads a dataset/attribute into a 1-dimensional array.
The dataset/attribute must be 1-dimensional.
pub fn read_slice_1d<T, S>(
&self,
slice: &SliceInfo<S, Ix1>
) -> Result<Array1<T>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
[src]
&self,
slice: &SliceInfo<S, Ix1>
) -> Result<Array1<T>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
Reads the given slice
of the dataset into a 1-dimensional array.
The slice must yield a 1-dimensional result.
pub fn read_2d<T: H5Type>(&self) -> Result<Array2<T>>
[src]
Reads a dataset/attribute into a 2-dimensional array.
The dataset/attribute must be 2-dimensional.
pub fn read_slice_2d<T, S>(
&self,
slice: &SliceInfo<S, Ix2>
) -> Result<Array2<T>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
[src]
&self,
slice: &SliceInfo<S, Ix2>
) -> Result<Array2<T>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
Reads the given slice
of the dataset into a 2-dimensional array.
The slice must yield a 2-dimensional result.
pub fn read_dyn<T: H5Type>(&self) -> Result<ArrayD<T>>
[src]
Reads a dataset/attribute into an array with dynamic number of dimensions.
pub fn read_slice<T, S, D>(
&self,
slice: &SliceInfo<S, D>
) -> Result<Array<T, D>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
D: Dimension,
[src]
&self,
slice: &SliceInfo<S, D>
) -> Result<Array<T, D>> where
T: H5Type,
S: AsRef<[SliceOrIndex]>,
D: Dimension,
Reads a slice of an n-dimensional array.
If the dimensionality D
has a fixed number of dimensions, it must match the dimensionality of
the slice, after singleton dimensions are dropped.
Use the multi-dimensional slice macro s![]
from ndarray
to conveniently create
a multidimensional slice.
pub fn read_scalar<T: H5Type>(&self) -> Result<T>
[src]
Reads a scalar dataset/attribute.
pub fn write<'b, A, T, D>(&self, arr: A) -> Result<()> where
A: Into<ArrayView<'b, T, D>>,
T: H5Type,
D: Dimension,
[src]
A: Into<ArrayView<'b, T, D>>,
T: H5Type,
D: Dimension,
Writes an n-dimensional array view into a dataset/attribute.
The shape of the view must match the shape of the dataset/attribute exactly. The input argument must be convertible to an array view (this includes slices).
pub fn write_raw<'b, A, T>(&self, arr: A) -> Result<()> where
A: Into<ArrayView1<'b, T>>,
T: H5Type,
[src]
A: Into<ArrayView1<'b, T>>,
T: H5Type,
Writes a 1-dimensional array view into a dataset/attribute in memory order.
The number of elements in the view must match the number of elements in the destination dataset/attribute. The input argument must be convertible to a 1-dimensional array view (this includes slices).
pub fn write_slice<'b, A, T, S, D>(
&self,
arr: A,
slice: &SliceInfo<S, D>
) -> Result<()> where
A: Into<ArrayView<'b, T, D>>,
T: H5Type,
S: AsRef<[SliceOrIndex]>,
D: Dimension,
[src]
&self,
arr: A,
slice: &SliceInfo<S, D>
) -> Result<()> where
A: Into<ArrayView<'b, T, D>>,
T: H5Type,
S: AsRef<[SliceOrIndex]>,
D: Dimension,
Writes all data from the array arr
into the given slice
of the target dataset.
The shape of arr
must match the shape the set of elements included in the slice.
If the array has a fixed number of dimensions, it must match the dimensionality of
dataset. Use the multi-dimensional slice macro s![]
from ndarray
to conveniently create
a multidimensional slice.
pub fn write_scalar<T: H5Type>(&self, val: &T) -> Result<()>
[src]
Writes a scalar dataset/attribute.
Methods from Deref<Target = Location>
pub fn name(&self) -> String
[src]
Returns the name of the object within the file, or empty string if the object doesn't have a name (e.g., an anonymous dataset).
pub fn filename(&self) -> String
[src]
Returns the name of the file containing the named object (or the file itself).
pub fn file(&self) -> Result<File>
[src]
Returns a handle to the file containing the named object (or the file itself).
pub fn comment(&self) -> Option<String>
[src]
Returns the commment attached to the named object, if any.
pub fn set_comment(&self, comment: &str) -> Result<()>
[src]
Set or the commment attached to the named object.
pub fn clear_comment(&self) -> Result<()>
[src]
Clear the commment attached to the named object.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl !UnwindSafe for Container
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,