#[non_exhaustive]pub enum BuildRequestError {
MissingUrl,
InvalidUrl {
source: Box<dyn StdError + Send + Sync>,
},
UnsupportedScheme {
scheme: String,
},
MissingHost,
UserinfoNotAllowed,
InvalidHeader {
source: Box<dyn StdError + Send + Sync>,
},
EmptyTargets,
}Expand description
A Request could not be built.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingUrl
No URL was provided to the builder.
InvalidUrl
The URL could not be parsed.
UnsupportedScheme
The URL’s scheme is not https. This is an HTTP/3-only client;
requests are never sent over cleartext or fall back to TCP.
MissingHost
The URL has no host.
UserinfoNotAllowed
The URL contains userinfo (user:password@host). HTTP/3 forbids
userinfo in :authority (RFC 9114 §4.3.1), and sending it would leak
the credentials on the wire; pass credentials in an authorization
header instead.
InvalidHeader
A header name or value is invalid.
EmptyTargets
An empty target list was provided. Targets assert “resolution returned exactly this”, and an empty resolution result is an error, not a wildcard.
Trait Implementations§
Source§impl Debug for BuildRequestError
impl Debug for BuildRequestError
Source§impl Display for BuildRequestError
impl Display for BuildRequestError
Source§impl Error for BuildRequestError
impl Error for BuildRequestError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BuildRequestError> for Error
impl From<BuildRequestError> for Error
Source§fn from(error: BuildRequestError) -> Self
fn from(error: BuildRequestError) -> Self
An invalid request is an Error::InvalidRequest, so the convenience
entry points (Client::get,
Client::post) report builder failures through
the same taxonomy as the rest of the request path.
Auto Trait Implementations§
impl !RefUnwindSafe for BuildRequestError
impl !UnwindSafe for BuildRequestError
impl Freeze for BuildRequestError
impl Send for BuildRequestError
impl Sync for BuildRequestError
impl Unpin for BuildRequestError
impl UnsafeUnpin for BuildRequestError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request