pub struct Json<T>(pub T);Expand description
Wraps a value returned as structured content. The tool’s outputSchema
is generated from T, and the result carries both structuredContent
and the serialized JSON as text, as the specification recommends.
Tuple Fields§
§0: TTrait Implementations§
impl<T: Copy> Copy for Json<T>
impl<T: Eq> Eq for Json<T>
Source§impl<T: Serialize> IntoResourceContents for Json<T>
impl<T: Serialize> IntoResourceContents for Json<T>
Source§impl<T: Serialize + JsonSchema> IntoToolResult for Json<T>
impl<T: Serialize + JsonSchema> IntoToolResult for Json<T>
Source§fn into_tool_result(self) -> ToolResult
fn into_tool_result(self) -> ToolResult
Performs the conversion.
impl<T: PartialEq> StructuralPartialEq for Json<T>
Auto Trait Implementations§
impl<T> Freeze for Json<T>where
T: Freeze,
impl<T> RefUnwindSafe for Json<T>where
T: RefUnwindSafe,
impl<T> Send for Json<T>where
T: Send,
impl<T> Sync for Json<T>where
T: Sync,
impl<T> Unpin for Json<T>where
T: Unpin,
impl<T> UnsafeUnpin for Json<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Json<T>where
T: UnwindSafe,
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