pub struct IntentFormalization {
pub impulse_id: String,
pub source_text: String,
pub normalized_text: String,
pub language: String,
pub kind: IntentKind,
pub knowns: Vec<String>,
pub relevants: Vec<String>,
pub parameters: BTreeMap<String, String>,
pub route: Option<String>,
pub response_link: Option<String>,
}Fields§
§impulse_id: String§source_text: String§normalized_text: String§language: String§kind: IntentKind§knowns: Vec<String>§relevants: Vec<String>§parameters: BTreeMap<String, String>§route: Option<String>§response_link: Option<String>Implementations§
Source§impl IntentFormalization
impl IntentFormalization
Sourcepub fn to_links_notation(&self) -> String
pub fn to_links_notation(&self) -> String
Render this record as Links Notation.
source_text is the user’s own prompt, so a value carrying a quote is
ordinary rather than exotic. This used to hand-roll a C-style backslash
escape, which Links Notation does not define: notation escapes a quote by
doubling it, so a backslash left the quote visible to the reader, which
ended the value early and silently dropped the field — and once a value
has ended early, a quoted code fragment’s ( is an unclosed group rather
than text, so the whole document failed to parse. Delegating to
format_lino_record, which the rest of the codebase already publishes
records through, keeps the notation’s definition and this encoder from
drifting apart again.
pub fn has_relevant_handler(&self, name: &str) -> bool
Trait Implementations§
Source§impl Clone for IntentFormalization
impl Clone for IntentFormalization
Source§fn clone(&self) -> IntentFormalization
fn clone(&self) -> IntentFormalization
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 IntentFormalization
impl Debug for IntentFormalization
impl Eq for IntentFormalization
Source§impl PartialEq for IntentFormalization
impl PartialEq for IntentFormalization
impl StructuralPartialEq for IntentFormalization
Auto Trait Implementations§
impl Freeze for IntentFormalization
impl RefUnwindSafe for IntentFormalization
impl Send for IntentFormalization
impl Sync for IntentFormalization
impl Unpin for IntentFormalization
impl UnsafeUnpin for IntentFormalization
impl UnwindSafe for IntentFormalization
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.