pub struct TextGenerationContinuation<B, C>where
B: TextGenerationBackend,
C: TokenFilterController,{ /* 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>where
B: TextGenerationBackend,
C: TokenFilterController,
impl<B, C> TextGenerationContinuation<B, C>where
B: TextGenerationBackend,
C: TokenFilterController,
Sourcepub fn controller(&self) -> &C
pub fn controller(&self) -> &C
Borrows the canonical constraint state without advancing it.
Sourcepub fn controller_mut(&mut self) -> &mut C
pub fn controller_mut(&mut self) -> &mut C
Borrows the canonical constraint state for the ordinary semantic checks.
Sourcepub fn remaining_tokens(&self) -> Option<usize>
pub fn remaining_tokens(&self) -> Option<usize>
Remaining ordinary token allowance, independent of facade EOS policy.
Sourcepub fn is_prefill_pending(&self) -> bool
pub fn is_prefill_pending(&self) -> bool
Whether the next model input is the original prompt rather than a token.
Sourcepub fn require_quiescent(
&self,
) -> Result<(), TextContinuationError<B::Error, C::Error>>
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.