#[non_exhaustive]pub enum ToolError {
PermissionDenied(PermissionDenied),
InvalidArgument(String),
Internal(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl ToolError
impl ToolError
Sourcepub fn json_rpc_code(&self) -> i32
pub fn json_rpc_code(&self) -> i32
JSON-RPC error code 매핑 (transport adapter가 호출).
Sourcepub fn json_rpc_data(&self) -> Value
pub fn json_rpc_data(&self) -> Value
JSON-RPC error.data payload — kind 식별자 + 세부 필드.
transport adapter가 error response 직렬화 시 첨부. data.kind로 코드 충돌
가능성과 무관하게 SDK-level error를 식별 가능 (codex review 1 권고).
Trait Implementations§
Source§impl Error for ToolError
impl Error for ToolError
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<PermissionDenied> for ToolError
impl From<PermissionDenied> for ToolError
Source§fn from(source: PermissionDenied) -> Self
fn from(source: PermissionDenied) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolError
impl RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl UnsafeUnpin for ToolError
impl UnwindSafe for ToolError
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