pub struct SelectorInput<T> {
pub id: String,
pub content: T,
pub size: usize,
pub score: f32,
pub category: Option<String>,
pub information_gain: Option<f32>,
}Expand description
A single input item to a selector operation.
Fields§
§id: String§content: T§size: usizeSize in the unit of the caller’s budget (tokens, bytes, count).
score: f32Pre-computed relevance score.
category: Option<String>Optional category for diversity and category-weight scoring.
information_gain: Option<f32>Pre-computed information gain (KL divergence proxy) for this candidate.
Callers pre-compute this because the Selector is pure-math and has no
access to the embedding space required to estimate KL divergence. When
None (the default), the value is treated as 0.0. Only has an effect
when SelectorWeights.epistemic_weight > 0.0 (ADR-059).
Trait Implementations§
Source§impl<T: Clone> Clone for SelectorInput<T>
impl<T: Clone> Clone for SelectorInput<T>
Source§fn clone(&self) -> SelectorInput<T>
fn clone(&self) -> SelectorInput<T>
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 moreSource§impl<T: Debug> Debug for SelectorInput<T>
impl<T: Debug> Debug for SelectorInput<T>
Source§impl<'de, T> Deserialize<'de> for SelectorInput<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SelectorInput<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for SelectorInput<T>where
T: Freeze,
impl<T> RefUnwindSafe for SelectorInput<T>where
T: RefUnwindSafe,
impl<T> Send for SelectorInput<T>where
T: Send,
impl<T> Sync for SelectorInput<T>where
T: Sync,
impl<T> Unpin for SelectorInput<T>where
T: Unpin,
impl<T> UnsafeUnpin for SelectorInput<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SelectorInput<T>where
T: UnwindSafe,
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