Skip to main content

RealtimeGenerationBranch

Struct RealtimeGenerationBranch 

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

Unpublished branch of every mutable component in one realtime transition.

Implementations§

Source§

impl<MB, S, R, C> RealtimeGenerationBranch<MB, S, R, C>

Source

pub fn model_state_mut(&mut self) -> &mut MB

Mutably borrows the transition-local model/cache state.

Source

pub const fn schedule_state(&self) -> &RealtimeFrameScheduleState

Borrows the transition-local delayed-frame state.

Source

pub fn schedule_state_mut(&mut self) -> &mut RealtimeFrameScheduleState

Mutably borrows the transition-local delayed-frame state.

Source

pub fn samplers(&self) -> &[S]

Borrows transition-local sampler states in text-plus-depth order.

Source

pub const fn random_state(&self) -> Option<&R>

Borrows transition-local backend random state.

Source

pub fn attach_submission_completion( &mut self, completion: C, ) -> Result<(), RealtimeCompletionAttachmentError>

Attaches the one exact completion returned by backend submission.

Source

pub fn decision_driver<B>( &self, plan: SequentialDecisionPlan<B::Token>, temperatures: Vec<f32>, ) -> Result<SequentialDecisionDriver<B, S>, SequentialDecisionPlanError>
where B: SamplingBackend<RandomState = R>, S: Sampler<B> + Clone, R: Clone,

Creates the existing sequential decision driver from cloned branch-local sampler and random state.

The driver remains the sole state machine for forced, sampled, and diagnostic decisions. State is adopted back only after it finishes.

Source

pub fn adopt_decision_driver<B>( &mut self, driver: SequentialDecisionDriver<B, S>, ) -> Result<(), SequentialDecisionError<B::Error>>
where B: SamplingBackend<RandomState = R>, S: Sampler<B>,

Atomically adopts sampler and random state from a completed existing sequential decision driver.

An incomplete driver returns an error and leaves this branch unchanged.

Trait Implementations§

Source§

impl<MB: Debug, S: Debug, R: Debug, C: Debug> Debug for RealtimeGenerationBranch<MB, S, R, C>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<MB, S, R, C> Freeze for RealtimeGenerationBranch<MB, S, R, C>
where MB: Freeze, Vec<S>: Freeze, Option<R>: Freeze, Option<C>: Freeze,

§

impl<MB, S, R, C> RefUnwindSafe for RealtimeGenerationBranch<MB, S, R, C>

§

impl<MB, S, R, C> Send for RealtimeGenerationBranch<MB, S, R, C>
where MB: Send, Vec<S>: Send, Option<R>: Send, Option<C>: Send,

§

impl<MB, S, R, C> Sync for RealtimeGenerationBranch<MB, S, R, C>
where MB: Sync, Vec<S>: Sync, Option<R>: Sync, Option<C>: Sync,

§

impl<MB, S, R, C> Unpin for RealtimeGenerationBranch<MB, S, R, C>
where MB: Unpin, Vec<S>: Unpin, Option<R>: Unpin, Option<C>: Unpin,

§

impl<MB, S, R, C> UnsafeUnpin for RealtimeGenerationBranch<MB, S, R, C>

§

impl<MB, S, R, C> UnwindSafe for RealtimeGenerationBranch<MB, 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, <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.