Skip to main content

Admission

Struct Admission 

Source
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

Source

pub const fn fence(&self) -> u64

Returns the fence this admission was verified against.

Source

pub const fn expected(&self) -> Option<&JournalHead>

Returns the head this admission was verified to extend, if any.

Source

pub fn objects(&self) -> &[JournalObject]

Returns the immutable objects this admission publishes.

Source

pub fn entries(&self) -> &[JournalEntry]

Returns the ordered entry batch this admission publishes.

Auto Trait Implementations§

§

impl Forget for Admission

§

impl Freeze for Admission

§

impl Move for Admission

§

impl RefUnwindSafe for Admission

§

impl Send for Admission
where Arc<str>: Send, RawVecInner: Send,

§

impl Sync for Admission
where Arc<str>: Sync, RawVecInner: Sync,

§

impl Unpin for Admission
where Arc<str>: Unpin, *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Admission

§

impl UnwindSafe for Admission
where Arc<str>: UnwindSafe, RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.