pub struct PendingCompaction { /* private fields */ }Expand description
A compaction that is in flight while the run continues.
The future is owned and 'static, which is what lets it be carried across
turn boundaries and polled next to the model stream without an executor:
the agent races the two with futures_lite::future::or and keeps
whichever finishes.
Implementations§
Source§impl PendingCompaction
impl PendingCompaction
Sourcepub fn start<D: HandoffSchema, M: LanguageModel + 'static>(
fork: CompactionFork<D>,
model: M,
) -> Self
pub fn start<D: HandoffSchema, M: LanguageModel + 'static>( fork: CompactionFork<D>, model: M, ) -> Self
Starts fork against an owned model.
Sourcepub const fn fork_point(&self) -> u64
pub const fn fork_point(&self) -> u64
The sequence number items must reach to survive this compaction.
Sourcepub fn wait(
&mut self,
) -> impl Future<Output = Result<CompletedCompaction, CompactionError>> + '_
pub fn wait( &mut self, ) -> impl Future<Output = Result<CompletedCompaction, CompactionError>> + '_
Awaits the completed compaction.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PendingCompaction
impl !UnwindSafe for PendingCompaction
impl Forget for PendingCompaction
impl Freeze for PendingCompaction
impl Move for PendingCompaction
impl Send for PendingCompaction
impl Sync for PendingCompaction
impl Unpin for PendingCompaction
impl UnsafeUnpin for PendingCompaction
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