pub struct ToolPollResult {
pub handle: String,
pub tool: String,
pub action_id: String,
pub status: ToolStatus,
pub chunks: Vec<ToolStreamChunk>,
pub dropped_chunks: u64,
pub result: Option<Value>,
pub error: Option<String>,
}Expand description
What poll returns: the drained chunks since the last poll plus the
invocation’s current status and, once terminal, its final result or
error extracted from the terminal chunk.
Fields§
§handle: String§tool: String§action_id: String§status: ToolStatus§chunks: Vec<ToolStreamChunk>Chunks produced since the previous poll (oldest first). Terminal chunk included when the stream just finished.
dropped_chunks: u64Chunks dropped from the buffer because it hit its cap before this poll drained it (0 for callers that poll promptly). The event broadcast may still have delivered them live.
result: Option<Value>Set once status is succeeded (from the done chunk’s payload).
error: Option<String>Set once status is failed (from the error chunk’s message).
Trait Implementations§
Source§impl Clone for ToolPollResult
impl Clone for ToolPollResult
Source§impl Debug for ToolPollResult
impl Debug for ToolPollResult
Source§impl<'de> Deserialize<'de> for ToolPollResult
impl<'de> Deserialize<'de> for ToolPollResult
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
Source§impl JsonSchema for ToolPollResult
impl JsonSchema for ToolPollResult
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ToolPollResult
impl RefUnwindSafe for ToolPollResult
impl Send for ToolPollResult
impl Sync for ToolPollResult
impl Unpin for ToolPollResult
impl UnsafeUnpin for ToolPollResult
impl UnwindSafe for ToolPollResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more