pub struct GetTaskRequest {
pub id: String,
pub history_length: Option<u32>,
pub metadata: BTreeMap<String, Value>,
}Expand description
A typed GetTask request. Wire form:
{
"id": "task-123",
"historyLength": 10,
"metadata": { ... }
}id is required; historyLength and
metadata are optional. A request with
only the id serialises to {"id": "..."}
on the wire.
Fields§
§id: StringThe task’s id. Required.
history_length: Option<u32>The number of history messages to include in the response. A request with no history length lets the agent choose.
metadata: BTreeMap<String, Value>Per-request metadata. The spec leaves
the shape open; the conventional
keys are "trace_id", "session_id",
and the custom names a particular
deployment uses.
Implementations§
Source§impl GetTaskRequest
impl GetTaskRequest
Sourcepub fn new(id: impl Into<String>) -> Self
pub fn new(id: impl Into<String>) -> Self
Starts a new request with id. Use
with_history_length
to set the optional history length.
Sourcepub const fn with_history_length(self, length: u32) -> Self
pub const fn with_history_length(self, length: u32) -> Self
Sets the history length.
Trait Implementations§
Source§impl Clone for GetTaskRequest
impl Clone for GetTaskRequest
Source§impl Debug for GetTaskRequest
impl Debug for GetTaskRequest
Source§impl<'de> Deserialize<'de> for GetTaskRequest
impl<'de> Deserialize<'de> for GetTaskRequest
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 GetTaskRequest
Source§impl PartialEq for GetTaskRequest
impl PartialEq for GetTaskRequest
Source§impl Serialize for GetTaskRequest
impl Serialize for GetTaskRequest
impl StructuralPartialEq for GetTaskRequest
Auto Trait Implementations§
impl Freeze for GetTaskRequest
impl RefUnwindSafe for GetTaskRequest
impl Send for GetTaskRequest
impl Sync for GetTaskRequest
impl Unpin for GetTaskRequest
impl UnsafeUnpin for GetTaskRequest
impl UnwindSafe for GetTaskRequest
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