pub struct Code(/* private fields */);Expand description
Error code
This code represents an HTTP client/server error, shifted by 399. This means, that Code(1)
represents HTTP code 400. If http feature is enabled, you can freely transform from
Code to http::StatusCode.
Implementations§
Trait Implementations§
Source§impl From<Code> for StatusCode
Available on crate feature http only.
impl From<Code> for StatusCode
Available on crate feature
http only.Source§impl TryFrom<StatusCode> for Code
Available on crate feature http only.
impl TryFrom<StatusCode> for Code
Available on crate feature
http only.impl Copy for Code
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnwindSafe for Code
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