pub struct ResumeEntry {
pub interrupt_id: String,
pub status: ResumeStatus,
pub payload: Option<Value>,
pub metadata: Option<JsonObject>,
}Expand description
One answer to one Interrupt, sent on the resuming request.
Fields§
§interrupt_id: StringThe Interrupt::id being answered.
status: ResumeStatusWhether the user answered or declined.
payload: Option<Value>The answer. Shape is up to the agent; when the interrupt supplied a
responseSchema, this should satisfy it. For a tool approval that was
edited before approval, agents that advertise approveWithEdits expect
{"editedArgs": …} here.
metadata: Option<JsonObject>Envelope data about the answer — signatures, routing keys — as opposed
to payload, which is the answer the agent asked for and will act on.
A request field, so nothing merges into it. Absent or an object — a
JSON null is rejected. See crate::metadata.
Implementations§
Source§impl ResumeEntry
impl ResumeEntry
Sourcepub fn resolved(
interrupt_id: impl Into<String>,
payload: impl Into<Value>,
) -> Self
pub fn resolved( interrupt_id: impl Into<String>, payload: impl Into<Value>, ) -> Self
Answers an interrupt with a payload.
Sourcepub fn with_metadata(self, metadata: JsonObject) -> Self
pub fn with_metadata(self, metadata: JsonObject) -> Self
Attaches envelope metadata to the answer.
Trait Implementations§
Source§impl Clone for ResumeEntry
impl Clone for ResumeEntry
Source§fn clone(&self) -> ResumeEntry
fn clone(&self) -> ResumeEntry
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 ComposeSchema for ResumeEntry
impl ComposeSchema for ResumeEntry
Source§impl Debug for ResumeEntry
impl Debug for ResumeEntry
Source§impl<'de> Deserialize<'de> for ResumeEntry
impl<'de> Deserialize<'de> for ResumeEntry
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 ResumeEntry
impl JsonSchema for ResumeEntry
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 inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ResumeEntry
impl PartialEq for ResumeEntry
Source§fn eq(&self, other: &ResumeEntry) -> bool
fn eq(&self, other: &ResumeEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResumeEntry
impl Serialize for ResumeEntry
impl StructuralPartialEq for ResumeEntry
Auto Trait Implementations§
impl Freeze for ResumeEntry
impl RefUnwindSafe for ResumeEntry
impl Send for ResumeEntry
impl Sync for ResumeEntry
impl Unpin for ResumeEntry
impl UnsafeUnpin for ResumeEntry
impl UnwindSafe for ResumeEntry
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