Skip to main content

Reference

Enum Reference 

Source
pub enum Reference {
    Null,
    Object {
        address: u64,
        file: Option<String>,
        path: Option<String>,
    },
    Region {
        address: u64,
        file: Option<String>,
        path: Option<String>,
        selection: Selection,
    },
    Attr {
        address: u64,
        file: Option<String>,
        path: Option<String>,
        name: String,
    },
}
Expand description

One reference element, decoded and resolved against the file it came from.

path is the target’s absolute path when the file’s link structure names it, and None when nothing in the traversed structure points at that address — a reference into an untraversed part of the file, or a stale one left by a deletion. The address is reported either way.

Variants§

§

Null

An element naming no object: the undefined address libhdf5 writes for an unset object reference, or a zeroed region-reference heap id.

§

Object

A whole object — H5R_OBJECT1 or H5R_OBJECT2.

Fields

§address: u64

Object header address of the target.

§file: Option<String>

The file the target lives in; see Reference::file.

§path: Option<String>

Absolute path of the target.

§

Region

A dataset plus a selection over it — H5R_DATASET_REGION1 or H5R_DATASET_REGION2.

Fields

§address: u64

Object header address of the target dataset.

§file: Option<String>

The file the target dataset lives in; see Reference::file.

§path: Option<String>

Absolute path of the target dataset.

§selection: Selection

The selection the reference carries.

§

Attr

H5R_ATTR: one attribute of an object, by name. Only the 1.12 encodings can express it.

Fields

§address: u64

Object header address of the object the attribute belongs to.

§file: Option<String>

The file that object lives in; see Reference::file.

§path: Option<String>

Absolute path of that object.

§name: String

Name of the attribute.

Implementations§

Source§

impl Reference

Source

pub fn file(&self) -> Option<&str>

The file the target lives in, for a reference that names another file — H5Rget_file_name on an un-opened external reference. None means the file holding the reference, which is every reference libhdf5 can write without the H5R_IS_EXTERNAL flag.

The name is the one the target file was open under when the reference was written, recorded verbatim, and path is a path inside that file.

Source

pub fn path(&self) -> Option<&str>

The target’s absolute path, when the file names it.

Source

pub fn address(&self) -> Option<u64>

The target’s object header address, or None for a null reference.

Source

pub fn attribute_name(&self) -> Option<&str>

The attribute an attribute reference names; None for the other kinds.

Source

pub fn selection(&self) -> Option<&Selection>

The selection a region reference carries; None for the other kinds.

Source

pub fn bounds(&self) -> Option<(Vec<u64>, Vec<u64>)>

The inclusive bounding box of a region reference’s selection — H5Sget_select_bounds on the dereferenced region.

Source

pub fn is_null(&self) -> bool

Whether this element names no object.

Trait Implementations§

Source§

impl Clone for Reference

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Reference

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Reference

Source§

impl PartialEq for Reference

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Reference

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.