pub struct JsToolResult {
pub success: bool,
pub content: String,
pub error: Option<String>,
}Expand description
Result of a tool execution.
Fields§
§success: boolWhether the tool executed successfully
content: StringTool output content
error: Option<String>Error message (if success is false)
Implementations§
Trait Implementations§
Source§impl Clone for JsToolResult
impl Clone for JsToolResult
Source§fn clone(&self) -> JsToolResult
fn clone(&self) -> JsToolResult
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 JsToolResult
impl Debug for JsToolResult
Source§impl FromNapiValue for JsToolResult
impl FromNapiValue for JsToolResult
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for JsToolResult
impl ToNapiValue for JsToolResult
Source§unsafe fn to_napi_value(env: napi_env, val: JsToolResult) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: JsToolResult) -> Result<napi_value>
Safety Read more
Source§impl TypeName for JsToolResult
impl TypeName for JsToolResult
Source§impl ValidateNapiValue for JsToolResult
impl ValidateNapiValue for JsToolResult
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for JsToolResult
impl RefUnwindSafe for JsToolResult
impl Send for JsToolResult
impl Sync for JsToolResult
impl Unpin for JsToolResult
impl UnwindSafe for JsToolResult
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