pub enum HandleToolError {
None,
Bool(bool),
Message(String),
Handler(Arc<dyn Fn(&ToolException) -> String + Send + Sync>),
}Expand description
How to handle tool errors.
Variants§
None
Don’t handle errors (re-raise them).
Bool(bool)
Return a generic error message.
Message(String)
Return a specific error message.
Handler(Arc<dyn Fn(&ToolException) -> String + Send + Sync>)
Use a custom function to handle the error.
Trait Implementations§
Source§impl Clone for HandleToolError
impl Clone for HandleToolError
Source§fn clone(&self) -> HandleToolError
fn clone(&self) -> HandleToolError
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 HandleToolError
impl Debug for HandleToolError
Auto Trait Implementations§
impl Freeze for HandleToolError
impl !RefUnwindSafe for HandleToolError
impl Send for HandleToolError
impl Sync for HandleToolError
impl Unpin for HandleToolError
impl !UnwindSafe for HandleToolError
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