pub struct DeferredToolResult {
pub deferred_id: String,
pub status: ExecutionStatus,
pub response: Value,
pub metadata: Metadata,
}Expand description
SDK-facing deferred tool result.
Fields§
§deferred_id: StringDeferred request id.
status: ExecutionStatusResult status.
response: ValueResponse payload.
metadata: MetadataResult metadata.
Implementations§
Source§impl DeferredToolResult
impl DeferredToolResult
Sourcepub fn completed(deferred_id: impl Into<String>, response: Value) -> Self
pub fn completed(deferred_id: impl Into<String>, response: Value) -> Self
Build a completed deferred result.
Sourcepub fn failed(deferred_id: impl Into<String>, response: Value) -> Self
pub fn failed(deferred_id: impl Into<String>, response: Value) -> Self
Build a failed deferred result.
Sourcepub fn cancelled(deferred_id: impl Into<String>, response: Value) -> Self
pub fn cancelled(deferred_id: impl Into<String>, response: Value) -> Self
Build a cancelled deferred result.
Sourcepub fn with_metadata(self, metadata: Metadata) -> Self
pub fn with_metadata(self, metadata: Metadata) -> Self
Attach result metadata.
Sourcepub fn apply_to_record(self, record: &mut DeferredToolRecord)
pub fn apply_to_record(self, record: &mut DeferredToolRecord)
Apply this result to a durable deferred record.
Trait Implementations§
Source§impl Clone for DeferredToolResult
impl Clone for DeferredToolResult
Source§fn clone(&self) -> DeferredToolResult
fn clone(&self) -> DeferredToolResult
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 DeferredToolResult
impl Debug for DeferredToolResult
Source§impl<'de> Deserialize<'de> for DeferredToolResult
impl<'de> Deserialize<'de> for DeferredToolResult
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
impl Eq for DeferredToolResult
Source§impl PartialEq for DeferredToolResult
impl PartialEq for DeferredToolResult
Source§impl Serialize for DeferredToolResult
impl Serialize for DeferredToolResult
impl StructuralPartialEq for DeferredToolResult
Auto Trait Implementations§
impl Freeze for DeferredToolResult
impl RefUnwindSafe for DeferredToolResult
impl Send for DeferredToolResult
impl Sync for DeferredToolResult
impl Unpin for DeferredToolResult
impl UnsafeUnpin for DeferredToolResult
impl UnwindSafe for DeferredToolResult
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