pub struct ManagedTextContinuation<B: TextGenerationBackend, C: TokenFilterController> { /* private fields */ }Expand description
Ordinary continuation plus its logical branch-retention ownership. Moving or swapping native slots must keep this lease with the logical child, including while that child is installed in the shared executable.
Implementations§
Source§impl<B: TextGenerationBackend, C: TokenFilterController> ManagedTextContinuation<B, C>
impl<B: TextGenerationBackend, C: TokenFilterController> ManagedTextContinuation<B, C>
Sourcepub fn root(state: TextGenerationContinuation<B, C>) -> Self
pub fn root(state: TextGenerationContinuation<B, C>) -> Self
Wraps the initial ordinary run, whose baseline execution state is owned by the caller’s loaded runtime. Forked children are constructed with leases.
Sourcepub fn advance(
&mut self,
driver: &mut TextGenerationDriver<'_, B>,
) -> Result<Option<ControlledToken<B::Token>>, TextContinuationError<B::Error, C::Error>>
pub fn advance( &mut self, driver: &mut TextGenerationDriver<'_, B>, ) -> Result<Option<ControlledToken<B::Token>>, TextContinuationError<B::Error, C::Error>>
Advances the installed continuation using the existing ordinary driver.
Sourcepub fn take_completed_step(
&mut self,
driver: &mut TextGenerationDriver<'_, B>,
) -> Result<Option<CapturedStep>, TextContinuationError<B::Error, C::Error>>
pub fn take_completed_step( &mut self, driver: &mut TextGenerationDriver<'_, B>, ) -> Result<Option<CapturedStep>, TextContinuationError<B::Error, C::Error>>
Settles and drains this continuation’s bounded record step.
Sourcepub fn boundary<'d, 's>(
&'s mut self,
driver: &'d mut TextGenerationDriver<'_, B>,
) -> Result<TextContinuationBoundary<'d, 's, B, C>, TextContinuationError<B::Error, C::Error>>
pub fn boundary<'d, 's>( &'s mut self, driver: &'d mut TextGenerationDriver<'_, B>, ) -> Result<TextContinuationBoundary<'d, 's, B, C>, TextContinuationError<B::Error, C::Error>>
Lends a completed boundary while retaining this run’s branch reservation.
Sourcepub fn controller(&self) -> &C
pub fn controller(&self) -> &C
Canonical logical constraint state.
Sourcepub fn controller_mut(&mut self) -> &mut C
pub fn controller_mut(&mut self) -> &mut C
Mutable constraint queries used by the ordinary facade semantic driver.
Sourcepub fn retained_branch_bytes(&self) -> Option<u64>
pub fn retained_branch_bytes(&self) -> Option<u64>
Retained logical branch allowance, absent for the original baseline run.
Auto Trait Implementations§
impl<B, C> !RefUnwindSafe for ManagedTextContinuation<B, C>
impl<B, C> !Send for ManagedTextContinuation<B, C>
impl<B, C> !Sync for ManagedTextContinuation<B, C>
impl<B, C> !UnwindSafe for ManagedTextContinuation<B, C>
impl<B, C> Freeze for ManagedTextContinuation<B, C>where
TextGenerationContinuation<B, C>: Freeze,
impl<B, C> Unpin for ManagedTextContinuation<B, C>where
TextGenerationContinuation<B, C>: Unpin,
impl<B, C> UnsafeUnpin for ManagedTextContinuation<B, C>where
TextGenerationContinuation<B, C>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more