pub struct A2aErrorResponse { /* private fields */ }Expand description
A2A error response for Axum
Implementations§
Source§impl A2aErrorResponse
impl A2aErrorResponse
Sourcepub fn new(error: JsonRpcError, id: Value, status_code: StatusCode) -> Self
pub fn new(error: JsonRpcError, id: Value, status_code: StatusCode) -> Self
Create a new error response
Sourcepub fn invalid_request(message: &str, id: Value) -> Self
pub fn invalid_request(message: &str, id: Value) -> Self
Create an invalid request error response
Sourcepub fn method_not_found(method: &str, id: Value) -> Self
pub fn method_not_found(method: &str, id: Value) -> Self
Create a method not found error response
Sourcepub fn from_error(error: A2aError, id: Value) -> Self
pub fn from_error(error: A2aError, id: Value) -> Self
Create an error response from an A2aError
Trait Implementations§
Source§impl IntoResponse for A2aErrorResponse
impl IntoResponse for A2aErrorResponse
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for A2aErrorResponse
impl RefUnwindSafe for A2aErrorResponse
impl Send for A2aErrorResponse
impl Sync for A2aErrorResponse
impl Unpin for A2aErrorResponse
impl UnsafeUnpin for A2aErrorResponse
impl UnwindSafe for A2aErrorResponse
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