pub enum FlexError {
PathNotFound {
path: String,
},
TypeMismatch {
path: String,
expected: String,
actual: String,
},
IndexOutOfBounds {
path: String,
index: usize,
len: usize,
},
DeserializeError {
path: String,
source: Error,
},
InvalidPath {
detail: String,
},
CoercionFailed {
path: String,
detail: String,
},
ShapingDiagnostics {
count: usize,
diagnostics: Vec<Diagnostic>,
},
HandlerError {
name: String,
detail: String,
},
}Expand description
Errors during navigation, extraction, and shaping.
Variants§
PathNotFound
A path segment did not resolve to any value.
TypeMismatch
The value at a path was a different type than expected.
Fields
IndexOutOfBounds
An array index exceeded the array length.
Fields
DeserializeError
Serde deserialization failed after coercion.
InvalidPath
The path string itself was malformed.
CoercionFailed
A coercion was attempted but could not succeed.
ShapingDiagnostics
Shaping produced diagnostics that the mode treats as errors.
Fields
§
diagnostics: Vec<Diagnostic>The individual diagnostics.
HandlerError
A tool call handler returned an error.
Trait Implementations§
Source§impl Error for FlexError
impl Error for FlexError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for FlexError
impl !RefUnwindSafe for FlexError
impl Send for FlexError
impl Sync for FlexError
impl Unpin for FlexError
impl UnsafeUnpin for FlexError
impl !UnwindSafe for FlexError
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