#[non_exhaustive]pub enum PruneStrategy {
ImportanceFirst,
RoundRobin,
}Expand description
How apply_budget orders dropped contributions when the assembled set
exceeds the prompt budget.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ImportanceFirst
Default. Sort dropped candidates by priority ascending, then importance ascending — lowest-importance items in the lowest priority bucket are dropped first.
RoundRobin
Sweep one source at a time within each priority bucket, dropping the least-important contribution from each source in turn. Useful when several sources share a priority and you don’t want one source to keep all of its content while another loses everything.
Trait Implementations§
Source§impl Clone for PruneStrategy
impl Clone for PruneStrategy
Source§fn clone(&self) -> PruneStrategy
fn clone(&self) -> PruneStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PruneStrategy
Source§impl Debug for PruneStrategy
impl Debug for PruneStrategy
Source§impl Default for PruneStrategy
impl Default for PruneStrategy
Source§fn default() -> PruneStrategy
fn default() -> PruneStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PruneStrategy
impl<'de> Deserialize<'de> for PruneStrategy
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 PruneStrategy
Source§impl PartialEq for PruneStrategy
impl PartialEq for PruneStrategy
Source§fn eq(&self, other: &PruneStrategy) -> bool
fn eq(&self, other: &PruneStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PruneStrategy
impl Serialize for PruneStrategy
impl StructuralPartialEq for PruneStrategy
Auto Trait Implementations§
impl Freeze for PruneStrategy
impl RefUnwindSafe for PruneStrategy
impl Send for PruneStrategy
impl Sync for PruneStrategy
impl Unpin for PruneStrategy
impl UnsafeUnpin for PruneStrategy
impl UnwindSafe for PruneStrategy
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