#[non_exhaustive]pub enum Error {
Show 43 variants
Hyper(Error),
Connect(Error),
Tls(Error),
InvalidDnsNameError(InvalidDnsNameError),
HttpRequestBodySize(Option<u64>),
DnsTimeout,
DnsError {
rcode: Option<String>,
info_code: Option<u16>,
},
DestinationNotFound,
DestinationUnavailable,
DestinationIpProhibited,
DestinationIpUnroutable,
ConnectionRefused,
ConnectionTerminated,
ConnectionTimeout,
ConnectionReadTimeout,
ConnectionWriteTimeout,
ConnectionLimitReached,
TlsProtocolError,
TlsCertificateError,
TlsAlertReceived {
alert_id: Option<u8>,
alert_message: Option<String>,
},
HttpRequestDenied,
HttpRequestLengthRequired,
HttpRequestMethodInvalid,
HttpRequestUriInvalid,
HttpRequestUriTooLong,
HttpRequestHeaderSectionSize(Option<u32>),
HttpRequestHeaderSize {
field_name: Option<String>,
field_size: Option<u32>,
},
HttpRequestTrailerSectionSize(Option<u32>),
HttpRequestTrailerSize {
field_name: Option<String>,
field_size: Option<u32>,
},
HttpResponseIncomplete,
HttpResponseHeaderSectionSize(Option<u32>),
HttpResponseHeaderSize {
field_name: Option<String>,
field_size: Option<u32>,
},
HttpResponseBodySize(Option<u64>),
HttpResponseTrailerSectionSize(Option<u32>),
HttpResponseTrailerSize {
field_name: Option<String>,
field_size: Option<u32>,
},
HttpResponseTransferCoding(Option<String>),
HttpResponseContentCoding(Option<String>),
HttpResponseTimeout,
HttpUpgradeFailed,
HttpProtocolError,
LoopDetected,
ConfigurationError,
InternalError(Option<String>),
}Expand description
Error type for wasi:http embedder interactions.
This error type is a superset of the wasip2/wasip3 error types for example and is the error that the embedder interacts with for all operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Hyper(Error)
Connect(Error)
Tls(Error)
InvalidDnsNameError(InvalidDnsNameError)
Available on crate feature
default-send-request only.HttpRequestBodySize(Option<u64>)
DnsTimeout
DnsError
DestinationNotFound
DestinationIpProhibited
DestinationIpUnroutable
ConnectionRefused
ConnectionTerminated
ConnectionTimeout
ConnectionReadTimeout
ConnectionWriteTimeout
ConnectionLimitReached
TlsProtocolError
TlsCertificateError
TlsAlertReceived
HttpRequestDenied
HttpRequestLengthRequired
HttpRequestMethodInvalid
HttpRequestUriInvalid
HttpRequestUriTooLong
HttpRequestHeaderSectionSize(Option<u32>)
HttpRequestHeaderSize
HttpRequestTrailerSectionSize(Option<u32>)
HttpRequestTrailerSize
HttpResponseIncomplete
HttpResponseHeaderSectionSize(Option<u32>)
HttpResponseHeaderSize
HttpResponseBodySize(Option<u64>)
HttpResponseTrailerSectionSize(Option<u32>)
HttpResponseTrailerSize
HttpResponseTransferCoding(Option<String>)
HttpResponseContentCoding(Option<String>)
HttpResponseTimeout
HttpUpgradeFailed
HttpProtocolError
LoopDetected
ConfigurationError
InternalError(Option<String>)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(e: Infallible) -> Self
fn from(e: Infallible) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more