pub struct EventStoreSession { /* private fields */ }Expand description
Live event-store session owned by the kernel between start() and finalize_stop().
Implementations§
Source§impl EventStoreSession
impl EventStoreSession
Sourcepub const fn manifest(&self) -> &RunManifest
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.
Sourcepub fn parent_run_id(&self) -> Option<&str>
pub fn parent_run_id(&self) -> Option<&str>
Returns the parent run id for the current run.
Sourcepub fn high_watermark(&self) -> u64
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.
Sourcepub fn snapshot_anchorer(&self) -> Option<SnapshotAnchorer>
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.
Sourcepub fn adapter(&self) -> Option<&Arc<BusCaptureAdapter>>
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.
Sourcepub fn close(&mut self, ts_init: UnixNanos) -> Result<(), EventStoreError>
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
impl Debug for EventStoreSession
Source§impl Drop for EventStoreSession
impl Drop for EventStoreSession
Auto Trait Implementations§
impl !RefUnwindSafe for EventStoreSession
impl !Send for EventStoreSession
impl !Sync for EventStoreSession
impl !UnwindSafe for EventStoreSession
impl Freeze for EventStoreSession
impl Unpin for EventStoreSession
impl UnsafeUnpin for EventStoreSession
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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