pub enum CompactionOutcome {
Compacted {
qdrant_future: Option<QdrantPersistFuture>,
},
CompactedWithPersistError {
qdrant_future: Option<QdrantPersistFuture>,
},
ProbeRejected,
NoChange,
}Expand description
Return type from compact_context() that distinguishes between successful compaction,
probe rejection, and no-op.
Gives maybe_compact() enough information to handle probe rejection without triggering
the Exhausted state — which would only be correct if summarization itself is stuck.
Variants§
Compacted
Messages were drained and replaced with a summary. SQLite persistence succeeded.
qdrant_future is an optional 'static future for the off-thread Qdrant write;
the shim must dispatch it through BackgroundSupervisor::spawn_summarization and
must not await it inline.
Fields
qdrant_future: Option<QdrantPersistFuture>Optional Qdrant write future to dispatch via the supervisor.
CompactedWithPersistError
Messages were drained and replaced with a summary, but synchronous SQLite persistence
reported failure. The in-memory state is correct; only persistence failed.
Fields
qdrant_future: Option<QdrantPersistFuture>Optional Qdrant write future to dispatch via the supervisor.
ProbeRejected
Probe rejected the summary — original messages are preserved.
Caller must NOT check freed_tokens or transition to Exhausted.
NoChange
No compaction was performed (too few messages, empty to_compact, etc.).
Implementations§
Source§impl CompactionOutcome
impl CompactionOutcome
Sourcepub fn qdrant_future_take(&mut self) -> Option<QdrantPersistFuture>
pub fn qdrant_future_take(&mut self) -> Option<QdrantPersistFuture>
Remove and return the Qdrant persistence future embedded in Compacted or
CompactedWithPersistError variants. Returns None for ProbeRejected / NoChange.
The shim calls this immediately after the service returns and dispatches the
future through BackgroundSupervisor::spawn_summarization.
Sourcepub fn is_compacted(&self) -> bool
pub fn is_compacted(&self) -> bool
Returns true when compaction succeeded (either variant of Compacted).
Trait Implementations§
Source§impl Debug for CompactionOutcome
impl Debug for CompactionOutcome
Source§impl PartialEq for CompactionOutcome
impl PartialEq for CompactionOutcome
Auto Trait Implementations§
impl Freeze for CompactionOutcome
impl !RefUnwindSafe for CompactionOutcome
impl Send for CompactionOutcome
impl !Sync for CompactionOutcome
impl Unpin for CompactionOutcome
impl UnsafeUnpin for CompactionOutcome
impl !UnwindSafe for CompactionOutcome
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request