pub struct ExtractedParameters {
pub values: HashMap<String, String>,
pub confidence: f64,
pub source: ParameterSource,
}Expand description
Represents parameters extracted from error contexts
Fields§
§values: HashMap<String, String>Key-value pairs of extracted parameters
confidence: f64Confidence level in the extracted parameters (0.0 to 1.0)
source: ParameterSourceSource of the parameters (error message, backtrace, etc.)
Implementations§
Source§impl ExtractedParameters
impl ExtractedParameters
Sourcepub fn new() -> ExtractedParameters
pub fn new() -> ExtractedParameters
Creates a new ExtractedParameters instance
Sourcepub fn with_source(
source: ParameterSource,
confidence: f64,
) -> ExtractedParameters
pub fn with_source( source: ParameterSource, confidence: f64, ) -> ExtractedParameters
Creates a new ExtractedParameters instance with the given source and confidence
Sourcepub fn add_parameter(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
) -> &mut ExtractedParameters
pub fn add_parameter( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> &mut ExtractedParameters
Adds a parameter to the collection
Sourcepub fn set_confidence(&mut self, confidence: f64) -> &mut ExtractedParameters
pub fn set_confidence(&mut self, confidence: f64) -> &mut ExtractedParameters
Sets the confidence level
Sourcepub fn set_source(
&mut self,
source: ParameterSource,
) -> &mut ExtractedParameters
pub fn set_source( &mut self, source: ParameterSource, ) -> &mut ExtractedParameters
Sets the source of the parameters
Sourcepub fn merge(&mut self, other: &ExtractedParameters) -> &mut ExtractedParameters
pub fn merge(&mut self, other: &ExtractedParameters) -> &mut ExtractedParameters
Merges another ExtractedParameters instance into this one
Trait Implementations§
Source§impl Clone for ExtractedParameters
impl Clone for ExtractedParameters
Source§fn clone(&self) -> ExtractedParameters
fn clone(&self) -> ExtractedParameters
Returns a copy 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 ExtractedParameters
impl Debug for ExtractedParameters
Source§impl Default for ExtractedParameters
impl Default for ExtractedParameters
Source§fn default() -> ExtractedParameters
fn default() -> ExtractedParameters
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtractedParameters
impl RefUnwindSafe for ExtractedParameters
impl Send for ExtractedParameters
impl Sync for ExtractedParameters
impl Unpin for ExtractedParameters
impl UnwindSafe for ExtractedParameters
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