pub struct RecoveryHint {
pub action: String,
pub explanation: String,
pub examples: Vec<String>,
pub confidence: f64,
}
Expand description
Recovery hint providing actionable suggestions for error resolution
Fields§
§action: String
Short description of the suggested action
explanation: String
Detailed explanation of why this action might help
examples: Vec<String>
Code examples or specific steps to take
confidence: f64
Confidence level that this hint will resolve the issue (0.0 to 1.0)
Implementations§
Source§impl RecoveryHint
impl RecoveryHint
Sourcepub fn new<S: Into<String>>(action: S, explanation: S, confidence: f64) -> Self
pub fn new<S: Into<String>>(action: S, explanation: S, confidence: f64) -> Self
Create a new recovery hint
Sourcepub fn with_example<S: Into<String>>(self, example: S) -> Self
pub fn with_example<S: Into<String>>(self, example: S) -> Self
Add an example to the recovery hint
Sourcepub fn with_examples<I, S>(self, examples: I) -> Self
pub fn with_examples<I, S>(self, examples: I) -> Self
Add multiple examples to the recovery hint
Trait Implementations§
Source§impl Clone for RecoveryHint
impl Clone for RecoveryHint
Source§fn clone(&self) -> RecoveryHint
fn clone(&self) -> RecoveryHint
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 RecoveryHint
impl Debug for RecoveryHint
Auto Trait Implementations§
impl Freeze for RecoveryHint
impl RefUnwindSafe for RecoveryHint
impl Send for RecoveryHint
impl Sync for RecoveryHint
impl Unpin for RecoveryHint
impl UnwindSafe for RecoveryHint
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> 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