pub struct HeaderNode {
pub tsn: Tsn,
pub free_lists_tree_root_id: PageID,
pub events_tree_root_id: PageID,
pub tags_tree_root_id: PageID,
pub next_page_id: PageID,
pub next_position: Position,
}Fields§
§tsn: Tsn§free_lists_tree_root_id: PageID§events_tree_root_id: PageID§next_page_id: PageID§next_position: PositionImplementations§
Source§impl HeaderNode
impl HeaderNode
pub fn default() -> Self
Sourcepub fn serialize_into(&self, buf: &mut [u8]) -> usize
pub fn serialize_into(&self, buf: &mut [u8]) -> usize
Writes the serialized HeaderNode into the provided buffer and returns the number of bytes written (48). The buffer must be at least 48 bytes long.
Sourcepub fn from_slice(slice: &[u8]) -> DCBResult<Self>
pub fn from_slice(slice: &[u8]) -> DCBResult<Self>
Creates a HeaderNode from a byte slice Expects a slice with 48 bytes:
- 8 bytes for tsn
- 8 bytes for next_page_id
- 8 bytes for free_lists_tree_root_id
- 8 bytes for events_tree_root_id
- 8 bytes for tags_tree_root_id
- 8 bytes for next_position
§Arguments
slice- The byte slice to deserialize from
§Returns
Result<Self>- The deserialized HeaderNode or an error
Trait Implementations§
Source§impl Clone for HeaderNode
impl Clone for HeaderNode
Source§fn clone(&self) -> HeaderNode
fn clone(&self) -> HeaderNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeaderNode
impl Debug for HeaderNode
Source§impl PartialEq for HeaderNode
impl PartialEq for HeaderNode
impl Eq for HeaderNode
impl StructuralPartialEq for HeaderNode
Auto Trait Implementations§
impl Freeze for HeaderNode
impl RefUnwindSafe for HeaderNode
impl Send for HeaderNode
impl Sync for HeaderNode
impl Unpin for HeaderNode
impl UnwindSafe for HeaderNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more