pub struct CanopyHttpError {
pub status: StatusCode,
pub path: String,
pub body: Bytes,
}Expand description
A non-2xx response from a canopy endpoint.
Endpoints give meaning to specific codes, so this carries the status and the body rather than flattening them into a message.
Fields§
§status: StatusCodeHTTP status returned by canopy.
path: StringThe endpoint path that was called.
body: BytesResponse body, as returned.
Implementations§
Trait Implementations§
Source§impl Debug for CanopyHttpError
impl Debug for CanopyHttpError
Source§impl Display for CanopyHttpError
impl Display for CanopyHttpError
Source§impl Error for CanopyHttpError
impl Error for CanopyHttpError
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<CanopyHttpError> for Error
impl From<CanopyHttpError> for Error
Source§fn from(source: CanopyHttpError) -> Self
fn from(source: CanopyHttpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for CanopyHttpError
impl RefUnwindSafe for CanopyHttpError
impl Send for CanopyHttpError
impl Sync for CanopyHttpError
impl Unpin for CanopyHttpError
impl UnsafeUnpin for CanopyHttpError
impl UnwindSafe for CanopyHttpError
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