pub struct ClassifierInput {
pub message: String,
pub context_tokens: usize,
pub turn_count: usize,
pub available_tools: Vec<String>,
}Expand description
Input for the classifier — metadata about the current request.
Fields§
§message: StringUser message text.
context_tokens: usizeEstimated context token count.
turn_count: usizeNumber of conversation turns so far.
available_tools: Vec<String>Tool names available in this session.
Implementations§
Source§impl ClassifierInput
impl ClassifierInput
Sourcepub fn contains_code_blocks(&self) -> bool
pub fn contains_code_blocks(&self) -> bool
Check if the message contains code blocks (``` markers).
Sourcepub fn contains_file_paths(&self) -> bool
pub fn contains_file_paths(&self) -> bool
Check if the message references file paths.
Detects patterns like src/main.rs, lib/config.ts, /etc/hosts.
Language-agnostic — relies on path structure, not words.
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Count the number of lines in the message.
Sourcepub fn symbol_density(&self) -> f64
pub fn symbol_density(&self) -> f64
Compute symbol density — ratio of code-like characters.
Counts {, }, (, ), [, ], <, >, =, ;, :,
|, &, !, @, #, $, %, ^, *, +, -, /.
Higher density suggests code, configuration, or technical content.
Sourcepub fn is_question(&self) -> bool
pub fn is_question(&self) -> bool
Check if the message ends with a question mark.
Sourcepub fn is_single_sentence(&self) -> bool
pub fn is_single_sentence(&self) -> bool
Check if the message appears to be a short, single-sentence statement.
Heuristic: ≤ 3 words and no newlines.
Sourcepub fn file_path_count(&self) -> usize
pub fn file_path_count(&self) -> usize
Count distinct file path references.
Trait Implementations§
Source§impl Clone for ClassifierInput
impl Clone for ClassifierInput
Source§fn clone(&self) -> ClassifierInput
fn clone(&self) -> ClassifierInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ClassifierInput
impl RefUnwindSafe for ClassifierInput
impl Send for ClassifierInput
impl Sync for ClassifierInput
impl Unpin for ClassifierInput
impl UnsafeUnpin for ClassifierInput
impl UnwindSafe for ClassifierInput
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.