pub struct RuntimeObservationOwner { /* private fields */ }Expand description
Cloneable shared ownership of one query observation session.
Clones carry the same terminal authority and the recorder’s first-terminal
rule makes sealing idempotent. Execution contexts still receive only
RuntimeObservationHandle.
Implementations§
Source§impl RuntimeObservationOwner
impl RuntimeObservationOwner
Sourcepub fn new(
query_id: impl Into<QueryId>,
trace_id: Option<TraceId>,
config: RuntimeObservationConfig,
) -> Self
pub fn new( query_id: impl Into<QueryId>, trace_id: Option<TraceId>, config: RuntimeObservationConfig, ) -> Self
Creates shared owner authority for a new query observation session.
Sourcepub fn with_clock(
query_id: impl Into<QueryId>,
trace_id: Option<TraceId>,
config: RuntimeObservationConfig,
clock: Arc<dyn RuntimeObservationClock>,
) -> Self
pub fn with_clock( query_id: impl Into<QueryId>, trace_id: Option<TraceId>, config: RuntimeObservationConfig, clock: Arc<dyn RuntimeObservationClock>, ) -> Self
Creates shared owner authority with an injected monotonic clock.
Sourcepub fn from_session(session: RuntimeObservationSession) -> Self
pub fn from_session(session: RuntimeObservationSession) -> Self
Wraps an existing unique session in shared one-shot ownership.
Sourcepub fn handle(&self) -> RuntimeObservationHandle
pub fn handle(&self) -> RuntimeObservationHandle
Returns cloneable recording access without terminal authority.
Sourcepub fn config(&self) -> RuntimeObservationConfig
pub fn config(&self) -> RuntimeObservationConfig
Returns the immutable recorder configuration used to create this owner.
Sourcepub fn seal(
&self,
outcome: RuntimeTerminalOutcome,
) -> Option<SealedRuntimeObservationSnapshot>
pub fn seal( &self, outcome: RuntimeTerminalOutcome, ) -> Option<SealedRuntimeObservationSnapshot>
Fixes the first terminal and returns the shared sealed snapshot.
Sourcepub fn finish_query(
&self,
outcome: Option<RuntimeTerminalOutcome>,
) -> Option<SealedRuntimeObservationSnapshot>
pub fn finish_query( &self, outcome: Option<RuntimeTerminalOutcome>, ) -> Option<SealedRuntimeObservationSnapshot>
Completes a query that has no admitted handle responsible for cleanup.
None is reserved for coordinator-owned records that have no attempt
lifecycle. Their observation still seals, and its terminal field stays
absent. The seal does not synthesize an engine attempt outcome from
delivery data.
Sourcepub fn live_snapshot(&self) -> Option<LiveRuntimeObservationSnapshot>
pub fn live_snapshot(&self) -> Option<LiveRuntimeObservationSnapshot>
Returns a live incomplete snapshot before terminal sealing.
Sourcepub fn sealed_snapshot(&self) -> Option<SealedRuntimeObservationSnapshot>
pub fn sealed_snapshot(&self) -> Option<SealedRuntimeObservationSnapshot>
Returns the immutable sealed snapshot once the first terminal outcome is fixed.
Sourcepub fn register_seal_observer<F>(&self, observer: F)
pub fn register_seal_observer<F>(&self, observer: F)
Registers an infallible notification for this session’s immutable seal.
The observer runs at most once for this registration and outside recorder locks. Registrations racing terminal publication join the owner’s delivery fence; registrations after that fence has completed deliver the existing snapshot immediately. A panic is isolated from query execution and cleanup.
Trait Implementations§
Source§impl Clone for RuntimeObservationOwner
impl Clone for RuntimeObservationOwner
Source§impl Debug for RuntimeObservationOwner
impl Debug for RuntimeObservationOwner
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeObservationOwner
impl !UnwindSafe for RuntimeObservationOwner
impl Freeze for RuntimeObservationOwner
impl Send for RuntimeObservationOwner
impl Sync for RuntimeObservationOwner
impl Unpin for RuntimeObservationOwner
impl UnsafeUnpin for RuntimeObservationOwner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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