pub struct ToolExecutionError {Show 17 fields
pub tool_name: String,
pub error_type: ToolErrorType,
pub category: ErrorCategory,
pub message: String,
pub retryable: bool,
pub is_recoverable: bool,
pub recovery_suggestions: Vec<Cow<'static, str>>,
pub retry_delay_ms: Option<u64>,
pub retry_after_ms: Option<u64>,
pub circuit_breaker_impact: bool,
pub partial_state_possible: bool,
pub rollback_performed: bool,
pub debug_context: Option<ToolErrorDebugContext>,
pub original_error: Option<String>,
pub patch_failure: Option<PatchFailure>,
pub inspection_failure: Option<Value>,
pub edit_failure: Option<EditFailure>,
}Fields§
§tool_name: String§error_type: ToolErrorType§category: ErrorCategory§message: String§retryable: bool§is_recoverable: bool§recovery_suggestions: Vec<Cow<'static, str>>§retry_delay_ms: Option<u64>§retry_after_ms: Option<u64>§circuit_breaker_impact: bool§partial_state_possible: bool§rollback_performed: bool§debug_context: Option<ToolErrorDebugContext>§original_error: Option<String>§patch_failure: Option<PatchFailure>§inspection_failure: Option<Value>§edit_failure: Option<EditFailure>Implementations§
Source§impl ToolExecutionError
impl ToolExecutionError
pub fn new( tool_name: impl Into<String>, error_type: ToolErrorType, message: impl Into<String>, ) -> Self
pub fn with_original_error( tool_name: impl Into<String>, error_type: ToolErrorType, message: impl Into<String>, original_error: impl Into<String>, ) -> Self
pub fn from_anyhow( tool_name: impl Into<String>, error: &Error, attempt_index: u32, partial_state_possible: bool, rollback_performed: bool, surface: Option<&str>, ) -> Self
Sourcepub fn patch_context_mismatch_path(&self) -> Option<&str>
pub fn patch_context_mismatch_path(&self) -> Option<&str>
Recovery path for typed patch or literal mismatches; never infer from source text.
Sourcepub fn is_redacted_patch_context(&self) -> bool
pub fn is_redacted_patch_context(&self) -> bool
Whether a patch failed because its source view was redacted.
Sourcepub fn is_exec_session_not_found(&self) -> bool
pub fn is_exec_session_not_found(&self) -> bool
Whether a typed runtime lookup failed, independent of quoted text.
pub fn policy_violation( tool_name: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn with_retry_decision(self, decision: RetryDecision) -> Self
pub fn with_partial_state( self, partial_state_possible: bool, rollback_performed: bool, ) -> Self
pub fn with_surface(self, surface: impl Into<String>) -> Self
pub fn with_attempt(self, attempt: u32) -> Self
pub fn with_invocation_id(self, invocation_id: impl Into<String>) -> Self
pub fn with_debug_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_tool_call_context(self, tool_name: &str, args: &Value) -> Self
pub fn attempts_made(&self) -> Option<u32>
pub fn retry_summary(&self) -> Option<String>
pub fn user_message(&self) -> String
pub fn retry_delay(&self) -> Option<Duration>
pub fn retry_after(&self) -> Option<Duration>
pub fn from_tool_output(output: &Value) -> Option<Self>
pub fn from_error_payload(error_payload: &Value) -> Option<Self>
pub fn to_json_value(&self) -> Value
Trait Implementations§
Source§impl Clone for ToolExecutionError
impl Clone for ToolExecutionError
Source§impl Debug for ToolExecutionError
impl Debug for ToolExecutionError
Source§impl<'de> Deserialize<'de> for ToolExecutionError
impl<'de> Deserialize<'de> for ToolExecutionError
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 Display for ToolExecutionError
impl Display for ToolExecutionError
Source§impl Error for ToolExecutionError
impl Error for ToolExecutionError
1.30.0 · 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<ToolExecutionError> for VtCodeError
impl From<ToolExecutionError> for VtCodeError
Source§fn from(err: ToolExecutionError) -> Self
fn from(err: ToolExecutionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for ToolExecutionError
impl Freeze for ToolExecutionError
impl Move for ToolExecutionError
impl RefUnwindSafe for ToolExecutionError
impl Send for ToolExecutionError
impl Sync for ToolExecutionError
impl Unpin for ToolExecutionError
impl UnsafeUnpin for ToolExecutionError
impl UnwindSafe for ToolExecutionError
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
impl<T> CacheValue for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> ErrorExt for T
impl<T> ErrorExt for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PtyHandle for Twhere
T: Send,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more