[][src]Struct hdf5::Container

#[repr(transparent)]pub struct 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]

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]

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]

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]

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]

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]

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.

Methods from Deref<Target = Object>

pub fn id(&self) -> hid_t[src]

pub fn refcount(&self) -> u32[src]

Returns reference count if the handle is valid and 0 otherwise.

pub fn is_valid(&self) -> bool[src]

Returns true if the object has a valid unlocked identifier (false for pre-defined locked identifiers like property list classes).

pub fn id_type(&self) -> H5I_type_t[src]

Returns type of the object.

Trait Implementations

impl Clone for Container[src]

impl Debug for Container[src]

impl Deref for Container[src]

type Target = Location

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.