pub struct A2AErrorData {
pub code: i32,
pub message: String,
}Expand description
Error payload within an A2A JSON-RPC response.
Fields§
§code: i32Error code.
message: StringHuman-readable error message.
Implementations§
Source§impl A2AErrorData
impl A2AErrorData
Sourcepub fn method_not_found() -> Self
pub fn method_not_found() -> Self
Standard error: method not found.
Sourcepub fn invalid_params(msg: impl Into<String>) -> Self
pub fn invalid_params(msg: impl Into<String>) -> Self
Standard error: invalid params.
Sourcepub fn internal_error(msg: impl Into<String>) -> Self
pub fn internal_error(msg: impl Into<String>) -> Self
Standard error: internal error.
Trait Implementations§
Source§impl Clone for A2AErrorData
impl Clone for A2AErrorData
Source§fn clone(&self) -> A2AErrorData
fn clone(&self) -> A2AErrorData
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 A2AErrorData
impl Debug for A2AErrorData
Source§impl<'de> Deserialize<'de> for A2AErrorData
impl<'de> Deserialize<'de> for A2AErrorData
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
Source§impl Display for A2AErrorData
impl Display for A2AErrorData
Source§impl Error for A2AErrorData
impl Error for A2AErrorData
1.30.0 · 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<A2AErrorData> for A2AError
impl From<A2AErrorData> for A2AError
Source§fn from(err: A2AErrorData) -> Self
fn from(err: A2AErrorData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for A2AErrorData
impl RefUnwindSafe for A2AErrorData
impl Send for A2AErrorData
impl Sync for A2AErrorData
impl Unpin for A2AErrorData
impl UnsafeUnpin for A2AErrorData
impl UnwindSafe for A2AErrorData
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