pub struct SuperblockSlot {
pub position_pages: u32,
pub size_bytes: u32,
}Expand description
One of the four superblock copies.
Fields§
§position_pages: u32Position in 256-byte units. Multiply by 256 to get the byte offset.
size_bytes: u32Size in bytes of the superblock body at that position.
Implementations§
Source§impl SuperblockSlot
impl SuperblockSlot
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when this slot is not usable as a superblock pointer.
Either field being zero disqualifies the slot: position=0 points
at the file header (1A 00 LSIG, not a superblock), and size=0
means there is nothing to read. Empirically (comparedbs.ntf and
other fresh / never-instantiated HCL templates) Domino writes
position=0 with a nonzero size on uninitialized slots, so the
stricter both-must-be-nonzero rule is required to filter them out.
Sourcepub fn byte_offset(&self) -> Option<u64>
pub fn byte_offset(&self) -> Option<u64>
Byte offset of this superblock body. Returns None for an empty
slot so consumers do not chase zero offsets.
Trait Implementations§
Source§impl Clone for SuperblockSlot
impl Clone for SuperblockSlot
Source§fn clone(&self) -> SuperblockSlot
fn clone(&self) -> SuperblockSlot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SuperblockSlot
Source§impl Debug for SuperblockSlot
impl Debug for SuperblockSlot
impl Eq for SuperblockSlot
Source§impl PartialEq for SuperblockSlot
impl PartialEq for SuperblockSlot
Source§fn eq(&self, other: &SuperblockSlot) -> bool
fn eq(&self, other: &SuperblockSlot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SuperblockSlot
Auto Trait Implementations§
impl Freeze for SuperblockSlot
impl RefUnwindSafe for SuperblockSlot
impl Send for SuperblockSlot
impl Sync for SuperblockSlot
impl Unpin for SuperblockSlot
impl UnsafeUnpin for SuperblockSlot
impl UnwindSafe for SuperblockSlot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more