Skip to main content

TextGenerationContinuation

Struct TextGenerationContinuation 

Source
pub struct TextGenerationContinuation<B, C>{ /* private fields */ }
Expand description

Pending input, sampling state and constraint state of the ordinary machine.

This is neither a full generation snapshot nor a cloneable native state. After commitment, the last token remains pending decode input. Completion handles stay here until settling or drop. The owning facade also retains native model state, semantic decoding, termination and output delivery.

Implementations§

Source§

impl<B, C> TextGenerationContinuation<B, C>

Source

pub fn controller(&self) -> &C

Borrows the canonical constraint state without advancing it.

Source

pub fn controller_mut(&mut self) -> &mut C

Borrows the canonical constraint state for the ordinary semantic checks.

Source

pub fn remaining_tokens(&self) -> Option<usize>

Remaining ordinary token allowance, independent of facade EOS policy.

Source

pub fn is_prefill_pending(&self) -> bool

Whether the next model input is the original prompt rather than a token.

Source

pub fn require_quiescent( &self, ) -> Result<(), TextContinuationError<B::Error, C::Error>>

Requires exact completion and delivery before snapshot composition. This does not establish the facade’s semantic or lifecycle boundary.

Auto Trait Implementations§

§

impl<B, C> Freeze for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: Freeze,

§

impl<B, C> RefUnwindSafe for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: RefUnwindSafe,

§

impl<B, C> Send for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: Send,

§

impl<B, C> Sync for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: Sync,

§

impl<B, C> Unpin for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: Unpin,

§

impl<B, C> UnsafeUnpin for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: UnsafeUnpin,

§

impl<B, C> UnwindSafe for TextGenerationContinuation<B, C>
where TextGenerationMachine<B, C>: UnwindSafe,

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.