pub struct SharedMessagePointer {
pub version: u8,
pub location: SharedLocation,
pub heap_id: [u8; 8],
pub oh_addr: u64,
}Expand description
A decoded shared-message pointer: the body of any object-header message
whose H5O_MSG_FLAG_SHARED bit is set.
Fields§
§version: u8Encoding version: 1, 2 or 3.
location: SharedLocationWhich storage the pointer names.
heap_id: [u8; 8]Fractal-heap ID, for Sohm.
oh_addr: u64Object header address, for Committed (and for the version-1 form,
which is always committed).
Implementations§
Sourcepub fn decode(buf: &[u8], ctx: &FormatContext) -> FormatResult<Self>
pub fn decode(buf: &[u8], ctx: &FormatContext) -> FormatResult<Self>
Decode the pointer that stands in for the message body.
Sourcepub fn committed(oh_addr: u64) -> Self
pub fn committed(oh_addr: u64) -> Self
The pointer a dataset (or attribute) built on a committed datatype stores in place of the message body.
H5O__shared_encode picks version 2 for H5O_SHARE_TYPE_COMMITTED —
version 3 exists for the heap form, which needs a flag byte version 2
has no room for — so a committed pointer libhdf5 wrote and one written
here agree byte for byte.
Sourcepub fn encode_committed(oh_addr: u64, ctx: &FormatContext) -> Vec<u8> ⓘ
pub fn encode_committed(oh_addr: u64, ctx: &FormatContext) -> Vec<u8> ⓘ
Encode the committed form — the inverse of decode
for the one shape this crate writes.
Only the committed form is produced, so this takes the address rather than a pointer and cannot fail: nothing here shares through the SOHM heap, and the version-1 form libhdf5 no longer writes has a symbol table entry in it that nothing here can fill.
Sourcepub fn encode_sohm(heap_id: [u8; 8]) -> Vec<u8> ⓘ
pub fn encode_sohm(heap_id: [u8; 8]) -> Vec<u8> ⓘ
The pointer a header stores in place of a message whose body was moved to the shared-message fractal heap.
Version 3, where the committed form stays at version 2: only version 3
has the type byte free to mean H5O_SHARE_TYPE_SOHM, and its body is
the fixed-width heap ID rather than an address, so it does not follow
the file’s address size.