pub enum SafeToolResult {
Envelope(ToolEnvelope),
Data(Value),
}Expand description
Return type for safe_tool bodies. Use ok(...) / fail(...) to build an explicit envelope,
or return Data(Value) to auto-wrap as {success:true, data:value}. From<ToolEnvelope> and
From<Value> impls let bodies just return Ok(env.into()) / return Ok(value.into()).
Variants§
Envelope(ToolEnvelope)
Data(Value)
Trait Implementations§
Source§impl Clone for SafeToolResult
impl Clone for SafeToolResult
Source§fn clone(&self) -> SafeToolResult
fn clone(&self) -> SafeToolResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SafeToolResult
impl Debug for SafeToolResult
Source§impl From<ToolEnvelope> for SafeToolResult
impl From<ToolEnvelope> for SafeToolResult
Source§fn from(e: ToolEnvelope) -> Self
fn from(e: ToolEnvelope) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SafeToolResult
impl RefUnwindSafe for SafeToolResult
impl Send for SafeToolResult
impl Sync for SafeToolResult
impl Unpin for SafeToolResult
impl UnsafeUnpin for SafeToolResult
impl UnwindSafe for SafeToolResult
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