pub enum WireMessage {
Request(JsonRpcRequest<Request>),
Event(JsonRpcNotification<Event>),
SuccessResponse(JsonRpcSuccessResponse<Value>),
ErrorResponse(JsonRpcErrorResponse),
}Expand description
A union type for all incoming wire messages.
Variants§
Request(JsonRpcRequest<Request>)
An incoming request from the agent (e.g. ApprovalRequest).
Event(JsonRpcNotification<Event>)
An incoming event from the agent (e.g. TurnBegin, ContentPart).
SuccessResponse(JsonRpcSuccessResponse<Value>)
A successful JSON-RPC response to a previous request.
ErrorResponse(JsonRpcErrorResponse)
A JSON-RPC error response.
Trait Implementations§
Source§impl Clone for WireMessage
impl Clone for WireMessage
Source§fn clone(&self) -> WireMessage
fn clone(&self) -> WireMessage
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 moreAuto Trait Implementations§
impl Freeze for WireMessage
impl RefUnwindSafe for WireMessage
impl Send for WireMessage
impl Sync for WireMessage
impl Unpin for WireMessage
impl UnsafeUnpin for WireMessage
impl UnwindSafe for WireMessage
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