Skip to main content

RealtimeSessionState

Struct RealtimeSessionState 

Source
pub struct RealtimeSessionState<M, S, R, C> { /* private fields */ }
Expand description

Canonical state for one fair-scheduler realtime request.

Implementations§

Source§

impl<M, S, R, C> RealtimeSessionState<M, S, R, C>

Source

pub const fn model_identity(&self) -> &RealtimeModelSessionIdentity

Exact selected model identity.

Source

pub const fn model_owner(&self) -> &RealtimeModelOwnerIdentity

Typed model owner derived from the selected contract.

Source

pub const fn incarnation(&self) -> RealtimeSessionIncarnation

Session incarnation allocated at first registration.

Source

pub const fn history_generation(&self) -> RealtimeHistoryGeneration

Coordinate-history generation preserved by release/resume.

Source

pub const fn committed_batch(&self) -> Option<NonZeroUsize>

Batch committed by the first successful frame, if any.

Source

pub fn payload_contract( &self, ingress: &RealtimeIngressContract, ) -> Result<RealtimePayloadContract, RealtimeSessionExecutionError>

Derives the exact payload contract for the committed session batch.

Source

pub const fn generation(&self) -> &RealtimeGenerationState<M, S, R, C>

Canonical atomic generation state.

Source

pub fn generation_mut(&mut self) -> &mut RealtimeGenerationState<M, S, R, C>

Mutably borrows generation state while the scheduler proves the request idle.

Trait Implementations§

Source§

impl<M, S, R, C> SemanticStateTransaction for RealtimeSessionState<M, S, R, C>
where M: SemanticStateTransaction, M::Error: 'static, S: Clone, R: Clone, C: Completion,

Source§

type Branch = RealtimeSessionBranch<<M as SemanticStateTransaction>::Branch, S, R, C>

Transition-local branch.
Source§

type Error = RealtimeSessionTransactionError<<M as SemanticStateTransaction>::Error, <C as Completion>::Error>

State error.
Source§

fn branch(&self) -> Result<Self::Branch, Self::Error>

Creates an unpublished branch.
Source§

fn commit_branch(&mut self, branch: Self::Branch) -> Result<(), Self::Error>

Publishes a completed branch.
Source§

fn discard_branch(branch: Self::Branch) -> Result<(), Self::Error>

Discards an unpublished branch.
Source§

fn permits_parallel_branches(&self) -> bool

Whether independent branches may share the current canonical base.

Auto Trait Implementations§

§

impl<M, S, R, C> Freeze for RealtimeSessionState<M, S, R, C>
where RealtimeGenerationState<M, S, R, C>: Freeze,

§

impl<M, S, R, C> RefUnwindSafe for RealtimeSessionState<M, S, R, C>

§

impl<M, S, R, C> Send for RealtimeSessionState<M, S, R, C>
where RealtimeGenerationState<M, S, R, C>: Send,

§

impl<M, S, R, C> Sync for RealtimeSessionState<M, S, R, C>
where RealtimeGenerationState<M, S, R, C>: Sync,

§

impl<M, S, R, C> Unpin for RealtimeSessionState<M, S, R, C>
where RealtimeGenerationState<M, S, R, C>: Unpin,

§

impl<M, S, R, C> UnsafeUnpin for RealtimeSessionState<M, S, R, C>

§

impl<M, S, R, C> UnwindSafe for RealtimeSessionState<M, S, R, C>

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

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.