pub struct Understanding {Show 13 fields
pub intent: Intent,
pub filter: Option<Expr>,
pub sort: Option<Metric>,
pub targets: Vec<(String, f64)>,
pub need_bytes: Option<u64>,
pub command: Option<Command>,
pub confidence: f64,
pub alternatives: Vec<Intent>,
pub interpretations: Vec<Interpretation>,
pub corrections: Vec<Correction>,
pub normalized: String,
pub error: Option<String>,
pub sort_time: Option<TimeMetric>,
}Fields§
§intent: Intent§filter: Option<Expr>§sort: Option<Metric>§targets: Vec<(String, f64)>Linked entity ids with scores, best first.
need_bytes: Option<u64>§command: Option<Command>§confidence: f640..1; below LOW_CONFIDENCE the palette shows interpretations instead of guessing.
alternatives: Vec<Intent>Intents of the runner-up interpretations when confidence is low (kept for older consumers).
interpretations: Vec<Interpretation>Top-3 interpretations, best first (always filled when anything was understood).
corrections: Vec<Correction>Typo/alias fixes applied (“showing results for …”).
normalized: StringThe normalized input (lowercase, units joined, typos fixed).
error: Option<String>Filter syntax error, if the input looked structured but did not parse.
sort_time: Option<TimeMetric>:sort age|duty|rent|stale: a time sort key (then sort is None); see sort_groups_by_time.
Implementations§
Source§impl Understanding
impl Understanding
Sourcepub fn is_ambiguous(&self) -> bool
pub fn is_ambiguous(&self) -> bool
True when the palette should offer choices instead of acting.
Sourcepub fn top_target(&self) -> Option<&str>
pub fn top_target(&self) -> Option<&str>
Best linked entity id, if any.
Trait Implementations§
Source§impl Clone for Understanding
impl Clone for Understanding
Source§impl Debug for Understanding
impl Debug for Understanding
Source§impl<'de> Deserialize<'de> for Understanding
impl<'de> Deserialize<'de> for Understanding
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
Source§impl PartialEq for Understanding
impl PartialEq for Understanding
Source§impl Serialize for Understanding
impl Serialize for Understanding
impl StructuralPartialEq for Understanding
Auto Trait Implementations§
impl Forget for Understanding
impl Freeze for Understandingwhere
*const u8 is !null: Freeze,
PhantomData<Expr>: Freeze,
*const Expr is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, f64)>: Freeze,
PhantomData<Intent>: Freeze,
PhantomData<Interpretation>: Freeze,
PhantomData<Correction>: Freeze,
impl Move for Understanding
impl RefUnwindSafe for Understanding
impl Send for Understanding
impl Sync for Understanding
impl Unpin for Understanding
impl UnsafeUnpin for Understandingwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
*const Expr is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, f64)>: UnsafeUnpin,
PhantomData<Intent>: UnsafeUnpin,
PhantomData<Interpretation>: UnsafeUnpin,
PhantomData<Correction>: UnsafeUnpin,
impl UnwindSafe for Understanding
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