[][src]Struct hidefix::idx::Dataset

pub struct Dataset<'a, const D: usize> {
    pub dtype: Datatype,
    pub dsize: usize,
    pub order: ByteOrder,
    pub chunks: Cow<'a, [Chunk<D>]>,
    pub shape: [u64; D],
    pub chunk_shape: [u64; D],
    pub scaled_dim_sz: [u64; D],
    pub dim_sz: [u64; D],
    pub chunk_dim_sz: [u64; D],
    pub shuffle: bool,
    pub gzip: Option<u8>,
    // some fields omitted
}

A HDF5 dataset (a single variable).

Note to reader implementations: The official HDF5 library uses a 1MB dataset cache by default.

Fields

dtype: Datatypedsize: usizeorder: ByteOrderchunks: Cow<'a, [Chunk<D>]>shape: [u64; D]chunk_shape: [u64; D]scaled_dim_sz: [u64; D]dim_sz: [u64; D]chunk_dim_sz: [u64; D]shuffle: boolgzip: Option<u8>

Implementations

impl<const D: usize> Dataset<'_, D>[src]

pub fn index(ds: &Dataset) -> Result<Dataset<'static, D>, Error>[src]

pub fn new<'a, C>(
    dtype: Datatype,
    order: ByteOrder,
    shape: [u64; D],
    chunks: C,
    chunk_shape: [u64; D],
    shuffle: bool,
    gzip: Option<u8>
) -> Result<Dataset<'a, D>, Error> where
    C: Into<Cow<'a, [Chunk<D>]>>, 
[src]

#[must_use]pub fn size(&self) -> usize[src]

Number of elements in dataset.

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

Dataset contains a single scalar value.

pub fn chunk_slices(
    &self,
    indices: Option<&[u64; D]>,
    counts: Option<&[u64; D]>
) -> impl Iterator<Item = (&Chunk<D>, u64, u64)>
[src]

Returns an iterator over chunk, offset and size which if joined will make up the specified slice through the variable.

pub fn chunk_at_coord(&self, indices: &[u64]) -> &Chunk<D>[src]

Trait Implementations

impl<'a, const D: usize> Debug for Dataset<'a, D>[src]

impl<'de: 'a, 'a, const D: usize> Deserialize<'de> for Dataset<'a, D>[src]

impl<'a, const D: usize> Serialize for Dataset<'a, D>[src]

Auto Trait Implementations

impl<'a, const D: usize> RefUnwindSafe for Dataset<'a, D>[src]

impl<'a, const D: usize> Send for Dataset<'a, D>[src]

impl<'a, const D: usize> Sync for Dataset<'a, D>[src]

impl<'a, const D: usize> Unpin for Dataset<'a, D>[src]

impl<'a, const D: usize> UnwindSafe for Dataset<'a, D>[src]

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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.