pub struct A2AResponse {
pub jsonrpc: String,
pub id: u64,
pub result: Option<Value>,
pub error: Option<A2AErrorData>,
}Expand description
A2A JSON-RPC style response.
Fields§
§jsonrpc: StringJSON-RPC version.
id: u64Request identifier this response corresponds to.
result: Option<Value>Result payload (present on success).
error: Option<A2AErrorData>Error payload (present on failure).
Implementations§
Source§impl A2AResponse
impl A2AResponse
Sourcepub fn from_error_data(id: u64, error: A2AErrorData) -> Self
pub fn from_error_data(id: u64, error: A2AErrorData) -> Self
Create an error response from error data.
Sourcepub fn into_result(self) -> Result<Value, A2AErrorData>
pub fn into_result(self) -> Result<Value, A2AErrorData>
Extract the result value, or return the error data.
Trait Implementations§
Source§impl Clone for A2AResponse
impl Clone for A2AResponse
Source§fn clone(&self) -> A2AResponse
fn clone(&self) -> A2AResponse
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 Debug for A2AResponse
impl Debug for A2AResponse
Source§impl<'de> Deserialize<'de> for A2AResponse
impl<'de> Deserialize<'de> for A2AResponse
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
Auto Trait Implementations§
impl Freeze for A2AResponse
impl RefUnwindSafe for A2AResponse
impl Send for A2AResponse
impl Sync for A2AResponse
impl Unpin for A2AResponse
impl UnsafeUnpin for A2AResponse
impl UnwindSafe for A2AResponse
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