Skip to main content

RetrievalWindowCandidatePlan

Struct RetrievalWindowCandidatePlan 

Source
pub struct RetrievalWindowCandidatePlan {
Show 25 fields pub message_ids_to_archive: Vec<String>, pub archive_message_count: usize, pub archive_group_count: usize, pub archive_user_turn_count: usize, pub archive_message_tokens: u32, pub active_message_count: usize, pub active_state_sha256: String, pub token_accounting_sha256: String, pub active_tokens_before: u32, pub projected_active_tokens_after: u32, pub context_window_tokens: u32, pub request_input_limit_tokens: u32, pub target_tokens: u32, pub target_usage_percent: u8, pub min_recent_user_turns: usize, pub fixed_prompt_tokens: u32, pub boundary_reclaimable_tokens: u32, pub system_message_tokens: u32, pub provider_message_token_override_count: usize, pub protected_active_tokens: u32, pub retained_recent_user_turn_count: usize, pub retained_user_turn_count: usize, pub oldest_retained_message_id: Option<String>, pub oldest_retained_user_message_id: Option<String>, pub incomplete_protocol_group_count: usize, /* private fields */
}
Expand description

Immutable evidence describing a safe retrieval-window archive candidate set.

Fields§

§message_ids_to_archive: Vec<String>

Message IDs to archive, in authoritative session order.

§archive_message_count: usize

Number of messages selected for archival.

§archive_group_count: usize

Number of complete logical groups selected, including a preamble group.

§archive_user_turn_count: usize

Number of selected groups anchored by a user message.

§archive_message_tokens: u32

Tokens represented by message_ids_to_archive.

§active_message_count: usize

Number of active messages observed before candidate selection.

§active_state_sha256: String

Versioned digest of every token-relevant active message field and its order at planning time.

§token_accounting_sha256: String

Versioned digest of the fixed prompt cost and provider-prepared message token estimate overrides used by this plan.

§active_tokens_before: u32

Active message plus fixed prompt tokens before candidate selection.

§projected_active_tokens_after: u32

Projected active tokens after the candidate messages are removed.

§context_window_tokens: u32

Provider context-window size used for the plan.

§request_input_limit_tokens: u32

Effective provider request-input limit after output and safety reserves.

§target_tokens: u32

Effective token target after output/safety reserves are respected.

§target_usage_percent: u8

Requested target percentage retained for observability.

§min_recent_user_turns: usize

Configured minimum number of newest user turns that must remain active.

§fixed_prompt_tokens: u32

Provider-visible prompt/tool tokens outside Session.messages.

§boundary_reclaimable_tokens: u32

Provider-visible tokens reclaimed once by the committed model-context boundary, independently of which ordinary message groups are archived.

§system_message_tokens: u32

Tokens contributed by active system messages.

§provider_message_token_override_count: usize

Active messages whose cost came from provider-prepared estimates.

§protected_active_tokens: u32

Active message tokens that cannot be selected by this plan.

§retained_recent_user_turn_count: usize

Number of groups retained specifically by the recent-turn floor.

§retained_user_turn_count: usize

Total user-anchored groups projected to remain active.

§oldest_retained_message_id: Option<String>

Oldest projected retained non-system message, if one remains.

§oldest_retained_user_message_id: Option<String>

User anchor of the oldest projected retained user turn, if one remains.

§incomplete_protocol_group_count: usize

Unsafe protocol groups that constrained selection.

Trait Implementations§

Source§

impl Clone for RetrievalWindowCandidatePlan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RetrievalWindowCandidatePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RetrievalWindowCandidatePlan

Source§

impl PartialEq for RetrievalWindowCandidatePlan

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RetrievalWindowCandidatePlan

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RetrievalWindowCandidatePlan

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more