pub enum HttpConvertError {
Method(InvalidMethod),
Status(InvalidStatusCode),
HeaderName(InvalidHeaderName),
HeaderValue(InvalidHeaderValue),
Uri(InvalidUri),
}Expand description
Error converting an httpsd value into the corresponding http crate type.
Only produced on the httpsd → http direction, where a method token, target
URI, or header field that httpsd accepts may not be valid per the stricter
http types.
Variants§
Method(InvalidMethod)
The method token is not a valid http::Method.
Status(InvalidStatusCode)
The status code is outside the valid range for http::StatusCode.
HeaderName(InvalidHeaderName)
A header name is not a valid http::HeaderName.
HeaderValue(InvalidHeaderValue)
A header value is not a valid http::HeaderValue.
Uri(InvalidUri)
The request target is not a valid http::Uri.
Trait Implementations§
Source§impl Debug for HttpConvertError
impl Debug for HttpConvertError
Source§impl Display for HttpConvertError
impl Display for HttpConvertError
Source§impl Error for HttpConvertError
impl Error for HttpConvertError
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<InvalidHeaderName> for HttpConvertError
impl From<InvalidHeaderName> for HttpConvertError
Source§fn from(e: InvalidHeaderName) -> Self
fn from(e: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for HttpConvertError
impl From<InvalidHeaderValue> for HttpConvertError
Source§fn from(e: InvalidHeaderValue) -> Self
fn from(e: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<InvalidMethod> for HttpConvertError
impl From<InvalidMethod> for HttpConvertError
Source§fn from(e: InvalidMethod) -> Self
fn from(e: InvalidMethod) -> Self
Converts to this type from the input type.
Source§impl From<InvalidStatusCode> for HttpConvertError
impl From<InvalidStatusCode> for HttpConvertError
Source§fn from(e: InvalidStatusCode) -> Self
fn from(e: InvalidStatusCode) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUri> for HttpConvertError
impl From<InvalidUri> for HttpConvertError
Source§fn from(e: InvalidUri) -> Self
fn from(e: InvalidUri) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpConvertError
impl RefUnwindSafe for HttpConvertError
impl Send for HttpConvertError
impl Sync for HttpConvertError
impl Unpin for HttpConvertError
impl UnsafeUnpin for HttpConvertError
impl UnwindSafe for HttpConvertError
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