pub struct AcpReply {
pub jsonrpc: String,
pub id: Value,
pub result: Value,
}Expand description
A JSON-RPC 2.0 reply: the agent’s answer to a request.
The wire form has either a result (success)
or an error (failure), never both, never
neither. The typed form is the same: a
Result<AcpReply, AcpPeerError> from the
peer’s send_request already encodes the
success/failure split. The peer’s
JsonRpc
variant is the failure case, so the
AcpReply value the consumer receives is
always the success case.
Fields§
§jsonrpc: StringThe reply’s JSON-RPC 2.0 protocol field.
Always "2.0". Carried through the
decoder as a sanity check on the agent’s
framing; the peer does not act on it.
id: ValueThe id the request carried. The peer uses the id to correlate; the consumer does not need to look at it.
result: ValueThe success result. The shape depends on the method; the peer does not decode it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AcpReply
impl<'de> Deserialize<'de> for AcpReply
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 AcpReply
impl StructuralPartialEq for AcpReply
Auto Trait Implementations§
impl Freeze for AcpReply
impl RefUnwindSafe for AcpReply
impl Send for AcpReply
impl Sync for AcpReply
impl Unpin for AcpReply
impl UnsafeUnpin for AcpReply
impl UnwindSafe for AcpReply
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