pub struct JournalHeader {
pub flags: u8,
pub compression: u8,
pub first_seq: u64,
pub last_seq: u64,
pub entry_count: u64,
pub body_len: u64,
pub body_checksum: [u8; 32],
pub prev_segment_checksum: u64,
pub created_ms: i64,
}Expand description
Header for a journal segment.
Fields§
§flags: u8§compression: u8§first_seq: u64Sequence number of the first entry in this segment.
last_seq: u64Sequence number of the last entry (0 if unsealed).
entry_count: u64Number of entries (0 if unsealed).
body_len: u64Length of the body in bytes (0 if unsealed).
body_checksum: [u8; 32]SHA-256 of the body bytes (zeros if unsealed).
prev_segment_checksum: u64Checksum from the previous segment (for cross-segment chain verification).
created_ms: i64Milliseconds since Unix epoch.
Implementations§
Source§impl JournalHeader
impl JournalHeader
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Returns true if the body is compressed.
Sourcepub fn has_chain_hash(&self) -> bool
pub fn has_chain_hash(&self) -> bool
Returns true if a chain hash trailer is present.
Trait Implementations§
Source§impl Clone for JournalHeader
impl Clone for JournalHeader
Source§fn clone(&self) -> JournalHeader
fn clone(&self) -> JournalHeader
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 JournalHeader
impl Debug for JournalHeader
Source§impl PartialEq for JournalHeader
impl PartialEq for JournalHeader
impl Eq for JournalHeader
impl StructuralPartialEq for JournalHeader
Auto Trait Implementations§
impl Freeze for JournalHeader
impl RefUnwindSafe for JournalHeader
impl Send for JournalHeader
impl Sync for JournalHeader
impl Unpin for JournalHeader
impl UnsafeUnpin for JournalHeader
impl UnwindSafe for JournalHeader
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.