pub struct ErrorFeatures {
pub message_length: f32,
pub type_keywords: f32,
pub borrow_keywords: f32,
pub import_keywords: f32,
pub lifetime_keywords: f32,
pub trait_keywords: f32,
pub has_line_number: f32,
pub has_column: f32,
pub has_code_snippets: f32,
pub has_arrows: f32,
pub has_error_code: f32,
pub suggestion_count: f32,
}Expand description
Features extracted from an error message for ML classification.
Fields§
§message_length: f32Message length (normalized)
type_keywords: f32Number of type-related keywords
borrow_keywords: f32Number of borrow-related keywords
import_keywords: f32Number of import-related keywords
lifetime_keywords: f32Number of lifetime-related keywords
trait_keywords: f32Number of trait-related keywords
has_line_number: f32Contains line number
has_column: f32Contains column number
has_code_snippets: f32Contains backticks (code snippets)
has_arrows: f32Contains arrow indicators
has_error_code: f32Error code present (e.g., E0308)
suggestion_count: f32Number of suggestions in message
Implementations§
Source§impl ErrorFeatures
impl ErrorFeatures
Sourcepub fn from_error_message(message: &str) -> Self
pub fn from_error_message(message: &str) -> Self
Extract features from an error message.
Trait Implementations§
Source§impl Clone for ErrorFeatures
impl Clone for ErrorFeatures
Source§fn clone(&self) -> ErrorFeatures
fn clone(&self) -> ErrorFeatures
Returns a duplicate of the value. Read more
1.0.0 · 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 ErrorFeatures
impl Debug for ErrorFeatures
Source§impl Default for ErrorFeatures
impl Default for ErrorFeatures
Source§fn default() -> ErrorFeatures
fn default() -> ErrorFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ErrorFeatures
impl<'de> Deserialize<'de> for ErrorFeatures
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 ErrorFeatures
impl RefUnwindSafe for ErrorFeatures
impl Send for ErrorFeatures
impl Sync for ErrorFeatures
impl Unpin for ErrorFeatures
impl UnwindSafe for ErrorFeatures
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more