pub enum Priority {
Low,
Normal,
High,
Critical,
}Expand description
Priority bucket for a crate::source::Source / crate::source::Contribution.
Drives both ordering and the per-priority floor in TokenBudget.
Sources should pick the lowest priority that still preserves correctness:
over-claiming Critical defeats the budget’s purpose.
Variants§
Low
Lowest priority. Pruned first when over budget.
Normal
Default priority for most sources.
High
High-value contributions (tools, fresh perception).
Critical
Must-keep contributions (system prompt, the user’s message).
Implementations§
Trait Implementations§
impl Copy for Priority
Source§impl<'de> Deserialize<'de> for Priority
impl<'de> Deserialize<'de> for Priority
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Priority
Source§impl Ord for Priority
impl Ord for Priority
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Priority
impl PartialOrd for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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