pub struct SelfHealingConfig {
pub enabled: bool,
pub max_attempts: usize,
pub min_confidence: f64,
pub cache_healed: bool,
pub max_context_bytes: usize,
pub include_screenshot: bool,
}Expand description
Configuration for self-healing behavior.
Fields§
§enabled: boolEnable self-healing.
max_attempts: usizeMaximum healing attempts per selector.
min_confidence: f64Minimum confidence required to try a suggested selector.
cache_healed: boolWhether to cache healed selectors for future use.
max_context_bytes: usizeMaximum HTML context bytes to include in diagnosis.
include_screenshot: boolWhether to include screenshot in diagnosis requests.
Implementations§
Source§impl SelfHealingConfig
impl SelfHealingConfig
Sourcepub fn with_max_attempts(self, max: usize) -> Self
pub fn with_max_attempts(self, max: usize) -> Self
Set max attempts.
Sourcepub fn with_min_confidence(self, conf: f64) -> Self
pub fn with_min_confidence(self, conf: f64) -> Self
Set minimum confidence.
Sourcepub fn with_cache(self, cache: bool) -> Self
pub fn with_cache(self, cache: bool) -> Self
Set whether to cache healed selectors.
Sourcepub fn with_max_context(self, bytes: usize) -> Self
pub fn with_max_context(self, bytes: usize) -> Self
Set max context bytes.
Trait Implementations§
Source§impl Clone for SelfHealingConfig
impl Clone for SelfHealingConfig
Source§fn clone(&self) -> SelfHealingConfig
fn clone(&self) -> SelfHealingConfig
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 SelfHealingConfig
impl Debug for SelfHealingConfig
Source§impl Default for SelfHealingConfig
impl Default for SelfHealingConfig
Source§impl<'de> Deserialize<'de> for SelfHealingConfig
impl<'de> Deserialize<'de> for SelfHealingConfig
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 SelfHealingConfig
impl PartialEq for SelfHealingConfig
Source§impl Serialize for SelfHealingConfig
impl Serialize for SelfHealingConfig
impl StructuralPartialEq for SelfHealingConfig
Auto Trait Implementations§
impl Freeze for SelfHealingConfig
impl RefUnwindSafe for SelfHealingConfig
impl Send for SelfHealingConfig
impl Sync for SelfHealingConfig
impl Unpin for SelfHealingConfig
impl UnwindSafe for SelfHealingConfig
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