pub enum Denial {
ForeignAuthority {
scheme: Option<Scheme>,
authority: Authority,
},
MalformedUri,
}Expand description
Why a request was refused before the server saw it.
Exhaustive on purpose: a new way to refuse should make the shell reconsider what it reports, at compile time.
A refusal becomes a 403 body and a log line, so the fields are an address
and nothing else: there is none a path or a query could arrive in.
Variants§
ForeignAuthority
The URL was not for the origin this protocol serves.
Nothing routable should produce this; it means the webview handed us a request meant for somewhere else.
Fields
The authority the request named.
MalformedUri
The canonical URL could not be rebuilt from its validated parts.
Unreachable in practice, and refusing beats unwrapping.
Trait Implementations§
impl Eq for Denial
Source§impl Error for Denial
impl Error for Denial
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()
impl StructuralPartialEq for Denial
Auto Trait Implementations§
impl !Freeze for Denial
impl RefUnwindSafe for Denial
impl Send for Denial
impl Sync for Denial
impl Unpin for Denial
impl UnsafeUnpin for Denial
impl UnwindSafe for Denial
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