pub struct Admission { /* private fields */ }Expand description
One atomic admission request. Implementations publish immutable objects and compare the head/fence in the same linearized operation.
Every field is pub(crate): the only place inside this crate that
constructs one is Journal::verified_admission, which
runs verify::verify_state/verify::verify_batch first. A backend
receives an Admission only as a trait-method parameter and reads it
through the accessors below; it cannot build one from scratch. This closes
the direct-bypass path where a caller outside this crate could once
construct an unverified Admission (any fence, any entries, no gapless or
predecessor check) and hand it straight to JournalBackend::admit or
JournalBackend::admit_then, skipping every journal-law check that
Journal exists to enforce.
Implementations§
Source§impl Admission
impl Admission
Sourcepub const fn expected(&self) -> Option<&JournalHead>
pub const fn expected(&self) -> Option<&JournalHead>
Returns the head this admission was verified to extend, if any.
Sourcepub fn objects(&self) -> &[JournalObject]
pub fn objects(&self) -> &[JournalObject]
Returns the immutable objects this admission publishes.
Sourcepub fn entries(&self) -> &[JournalEntry]
pub fn entries(&self) -> &[JournalEntry]
Returns the ordered entry batch this admission publishes.