Lines Matching refs:ErrorCode
2 use crate::p2::bindings::http::types::{self, ErrorCode};
26 pub fn downcast(self) -> wasmtime::Result<ErrorCode> { in downcast() argument
31 pub fn downcast_ref(&self) -> Option<&ErrorCode> { in downcast_ref() argument
36 impl From<ErrorCode> for HttpError {
37 fn from(error: ErrorCode) -> Self { in from()
138 pub(crate) fn dns_error(rcode: String, info_code: u16) -> ErrorCode { in dns_error() argument
139 ErrorCode::DnsError(crate::p2::bindings::http::types::DnsErrorPayload { in dns_error()
145 pub(crate) fn internal_error(msg: String) -> ErrorCode { in internal_error() argument
146 ErrorCode::InternalError(Some(msg)) in internal_error()
150 pub fn http_request_error(err: http::Error) -> ErrorCode { in http_request_error() argument
152 return ErrorCode::HttpRequestUriInvalid; in http_request_error()
157 ErrorCode::HttpProtocolError in http_request_error()
161 pub fn hyper_request_error(err: hyper::Error) -> ErrorCode { in hyper_request_error() argument
164 if let Some(err) = cause.downcast_ref::<ErrorCode>() { in hyper_request_error()
171 ErrorCode::HttpProtocolError in hyper_request_error()
175 pub fn hyper_response_error(err: hyper::Error) -> ErrorCode { in hyper_response_error() argument
177 return ErrorCode::HttpResponseTimeout; in hyper_response_error()
182 if let Some(err) = cause.downcast_ref::<ErrorCode>() { in hyper_response_error()
189 ErrorCode::HttpProtocolError in hyper_response_error()
192 impl From<hyper::Error> for ErrorCode { implementation