pub struct FieldGroup {
pub fields: Vec<String>,
pub estimated_value: f32,
pub default_include: bool,
}Expand description
One named subset of fields from a tool’s response. Providers carve the full result into groups so the planner can drop low-value fields without dropping the call entirely.
Conventionally a tool ships at least:
must_have— fields required for the response to be useful;nice_to_have— informative but droppable under budget;debug— low-value diagnostics, dropped first.
Fields§
§fields: Vec<String>JSON pointer-style field paths (e.g. "id", "author.email").
Empty list means “all remaining fields” — used by the
nice_to_have group as a wildcard.
estimated_value: f32Expected value contribution of this group, on a 0.0–1.0 scale,
relative to the tool’s total must_have value. The planner
multiplies this by the tool’s value_class to get the absolute
value-per-token used in the knapsack.
default_include: boolWhether the planner should include this group by default.
false means “opt-in” — only included when the user intent
explicitly mentions one of the fields.
Trait Implementations§
Source§impl Clone for FieldGroup
impl Clone for FieldGroup
Source§fn clone(&self) -> FieldGroup
fn clone(&self) -> FieldGroup
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 Debug for FieldGroup
impl Debug for FieldGroup
Source§impl Default for FieldGroup
impl Default for FieldGroup
Source§impl<'de> Deserialize<'de> for FieldGroup
impl<'de> Deserialize<'de> for FieldGroup
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 Freeze for FieldGroup
impl RefUnwindSafe for FieldGroup
impl Send for FieldGroup
impl Sync for FieldGroup
impl Unpin for FieldGroup
impl UnsafeUnpin for FieldGroup
impl UnwindSafe for FieldGroup
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