pub enum Unsupported {
Streaming {
header: HeaderName,
value: HeaderValue,
},
Compression {
encoding: HeaderValue,
},
SetCookie {
name: String,
},
Upgrade,
}Expand description
A capability the server used and this transport cannot carry.
Exhaustive on purpose. The probe binary keeps finding these one at a time,
and each new one should break every match that reports to a developer
rather than fall through to a generic message.
Each carries the header that gave it away, not a sentence about it, so
Display is the default rendering rather than the only one.
Variants§
Streaming
The response body arrives over time rather than all at once.
A protocol handler returns bytes, once. Server-sent events, chunked transfer, and any long-lived body have nowhere to go.
Compression
The body is compressed.
Origins::accept removes Accept-Encoding on
the way in, so a server that negotiates will not compress. One that
compresses unconditionally, or serves bodies compressed ahead of time,
reaches WKWebView. It does not decode what a custom protocol hands it,
and renders the bytes as text.
Nothing is lost by storing bodies compressed and decompressing before answering, because there is no wire here to save the bytes on.
Fields
encoding: HeaderValueThe Content-Encoding the server applied.
SetCookie
The response sets a cookie.
WebKit drops every Set-Cookie a custom protocol emits, so the value
never comes back and the server sees each request as the first.
Upgrade
The response asks to change protocols.
WebSockets need an HTTP upgrade, and there is no connection under a protocol handler to upgrade.
Trait Implementations§
Source§impl Clone for Unsupported
impl Clone for Unsupported
Source§fn clone(&self) -> Unsupported
fn clone(&self) -> Unsupported
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Unsupported
impl Debug for Unsupported
Source§impl Display for Unsupported
impl Display for Unsupported
impl Eq for Unsupported
Source§impl Error for Unsupported
impl Error for Unsupported
1.30.0 · 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()