Skip to main content

MessageType

Struct MessageType 

Source
pub struct MessageType(/* private fields */);
Available on crate feature std only.
Expand description

Identifies an HDF5 object header message type.

Every u16 is a valid MessageType, so an identifier that this crate does not recognize remains representable without losing its raw value. Recognized identifiers are exposed as associated constants such as Self::DATASPACE.

MessageType is carried by Error::MissingMessage. Its transparent representation gives it the same size, alignment, and ABI as u16.

The format specification calls the on-disk value the “Header Message Type” and defines its values in “Data Object Header Messages” of the format specification, version 4.0.

Implementations§

Source§

impl MessageType

Source

pub const NIL: Self

Identifies an object header message that the reader ignores.

Source

pub const DATASPACE: Self

Identifies the dimensionality and extents of a dataset.

Identifies the storage and indexing information for a group’s links.

Source

pub const DATATYPE: Self

Identifies the datatype of a dataset or committed datatype.

Source

pub const FILL_VALUE_OLD: Self

Identifies a fill value encoded in the original fill-value message format.

Source

pub const FILL_VALUE: Self

Identifies the value used to fill unwritten dataset elements.

Identifies a link stored in an object header.

Source

pub const EXTERNAL_DATA_FILES: Self

Identifies dataset data stored in files outside the HDF5 file.

The message lists the external files and the portions of those files used for the dataset. This crate does not follow external files and rejects a dataset that uses them.

H5Pset_external configures this storage in the C library. The message is defined in “The Data Storage - External Data Files Message” of the format specification, version 4.0.

Source

pub const DATA_LAYOUT: Self

Identifies how a dataset’s raw data is stored.

Source

pub const GROUP_INFO: Self

Identifies storage parameters for a group.

Source

pub const FILTER_PIPELINE: Self

Identifies the filter pipeline applied to a dataset’s raw data.

Source

pub const ATTRIBUTE: Self

Identifies an attribute stored in an object header.

Source

pub const SHARED_MESSAGE_TABLE: Self

Identifies the table used to locate shared object header messages.

Source

pub const OBJECT_HEADER_CONTINUATION: Self

Identifies a block that contains additional object header messages.

Source

pub const SYMBOL_TABLE: Self

Identifies the symbol-table storage used by an old-style group.

Source

pub const OBJECT_MODIFICATION_TIME: Self

Identifies the last modification time of an object.

Source

pub const B_TREE_K_VALUES: Self

Identifies non-default B-tree K values stored with an object.

Source

pub const ATTRIBUTE_INFO: Self

Identifies the storage and indexing information for densely stored attributes.

Source

pub const OBJECT_REFERENCE_COUNT: Self

Identifies the number of hard links that point to an object.

Source

pub const FILE_SPACE_INFO: Self

Identifies the information used to manage free space in the file.

Source

pub const fn is_known(self) -> bool

Returns whether this crate recognizes the message type.

Recognition means that the identifier has an associated constant and a symbolic name in this module. An identifier can be defined by the HDF5 specification without being recognized by this crate.

Source§

impl MessageType

Source

pub const fn from_u16(value: u16) -> Self

Constructs a message type without interpreting the raw identifier.

Every u16 is accepted. Use Self::is_known or Self::unknown_id when the distinction between recognized and unrecognized identifiers matters.

Source

pub const fn to_u16(self) -> u16

Returns the raw HDF5 message type identifier.

Source

pub const fn is_unknown(self) -> bool

Returns whether this crate does not recognize the message type.

An unrecognized identifier can still be defined by the HDF5 specification. It has no associated symbolic name in this crate.

Source

pub const fn unknown_id(self) -> Option<u16>

Returns the raw identifier when this crate does not recognize the message type.

Returns None when Self::is_known is true.

Trait Implementations§

Source§

impl Clone for MessageType

Source§

fn clone(&self) -> MessageType

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 Copy for MessageType

Source§

impl Debug for MessageType

Source§

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

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

impl Display for MessageType

Source§

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

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

impl Eq for MessageType

Source§

impl From<MessageType> for u16

Source§

fn from(value: MessageType) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for MessageType

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl Hash for MessageType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MessageType

Source§

fn eq(&self, other: &MessageType) -> 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 MessageType

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> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.