pub enum ToolContextError {
Missing(&'static str),
Encode {
key: &'static str,
source: Error,
},
Decode {
key: &'static str,
source: Error,
},
}Expand description
A ToolContext slot could not be read or written.
Variants§
Missing(&'static str)
A required typed value was absent.
Encode
A value could not be represented as JSON.
Decode
A stored value could not be decoded as the requested type.
Trait Implementations§
Source§impl Debug for ToolContextError
impl Debug for ToolContextError
Source§impl Display for ToolContextError
impl Display for ToolContextError
Source§impl Error for ToolContextError
impl Error for ToolContextError
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()
Source§impl From<ToolContextError> for ToolExecutionError
impl From<ToolContextError> for ToolExecutionError
Source§fn from(error: ToolContextError) -> ToolExecutionError
fn from(error: ToolContextError) -> ToolExecutionError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ToolContextError
impl !UnwindSafe for ToolContextError
impl Freeze for ToolContextError
impl Send for ToolContextError
impl Sync for ToolContextError
impl Unpin for ToolContextError
impl UnsafeUnpin for ToolContextError
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