pub enum A2aClientError {
Io(Error),
JsonRpc {
code: i64,
message: String,
},
Parse(Error),
StreamEnded(String),
}Expand description
What failed when A2aClient could not complete a call.
Variants§
Io(Error)
The peer could not be reached over HTTP, or returned a non-2xx status.
JsonRpc
The peer answered the JSON-RPC envelope with an error member.
The code and message are the JSON-RPC code and message
fields, copied verbatim. The data member, when present,
is dropped: it is the spec’s escape hatch for vendor
extensions, and a typed client that lifted it would force
every consumer to know every extension.
Fields
Parse(Error)
The response could not be parsed as the expected typed shape.
StreamEnded(String)
The SSE stream ended before the method’s expected terminal event.
Trait Implementations§
Source§impl Debug for A2aClientError
impl Debug for A2aClientError
Source§impl Display for A2aClientError
impl Display for A2aClientError
Source§impl Error for A2aClientError
impl Error for A2aClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for A2aClientError
impl From<Error> for A2aClientError
Auto Trait Implementations§
impl !RefUnwindSafe for A2aClientError
impl !UnwindSafe for A2aClientError
impl Freeze for A2aClientError
impl Send for A2aClientError
impl Sync for A2aClientError
impl Unpin for A2aClientError
impl UnsafeUnpin for A2aClientError
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