Skip to main content

EventStoreSession

Struct EventStoreSession 

Source
pub struct EventStoreSession { /* private fields */ }
Expand description

Live event-store session owned by the kernel between start() and finalize_stop().

Implementations§

Source§

impl EventStoreSession

Source

pub const fn manifest(&self) -> &RunManifest

Returns the captured manifest as it was written to disk at run start.

The high-watermark and end_ts_init advance after seal; the snapshot here is frozen at boot time.

Source

pub fn run_id(&self) -> &str

Returns the run id of the currently open run.

Source

pub fn parent_run_id(&self) -> Option<&str>

Returns the parent run id for the current run.

Source

pub fn is_halted(&self) -> bool

Returns whether the writer has fail-stopped.

Source

pub fn high_watermark(&self) -> u64

Returns the writer’s current durable high-watermark.

Returns 0 when the writer has been consumed by a prior close.

Source

pub fn snapshot_anchorer(&self) -> Option<SnapshotAnchorer>

Returns a snapshot anchorer bound to the open writer.

The execution engine installs this callback while the run is open. The callback records the cache-owned snapshot reference against the writer’s durable high-watermark after flushing earlier captured entries.

Source

pub fn adapter(&self) -> Option<&Arc<BusCaptureAdapter>>

Returns the live bus capture adapter, when one was wired into this run.

None after Self::close consumes the writer.

Source

pub fn close(&mut self, ts_init: UnixNanos) -> Result<(), EventStoreError>

Submits the terminal RunEnded entry, drains pending entries, and seals the manifest as RunStatus::Ended.

Consumes the inner writer; subsequent calls return without effect.

§Errors

Returns EventStoreError if the writer fails to commit the final batch, the seal step fails, or the writer Arc has outstanding clones (the bus tap must be cleared before close to release the adapter’s writer reference).

Trait Implementations§

Source§

impl Debug for EventStoreSession

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for EventStoreSession

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V