[−][src]Trait websocket::header::Header
A trait for any object that will represent a header field and value.
This trait represents the construction and identification of headers, and contains trait-object unsafe methods.
Required Methods
fn header_name() -> &'static str
Returns the name of the header field this belongs to.
This will become an associated constant once available.
fn parse_header(raw: &[Vec<u8>]) -> Result<Self, Error>
Parse a header from a raw stream of bytes.
It's possible that a request can include a header field more than once,
and in that case, the slice will have a length greater than 1. However,
it's not necessarily the case that a Header is allowed to have more
than one field value. If that's the case, you should return None
if raw.len() > 1
.
Implementors
impl Header for AccessControlAllowOrigin
[src]
impl Header for AccessControlAllowOrigin
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowOrigin, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowOrigin, Error>
impl Header for Expect
[src]
impl Header for Expect
impl Header for IfMatch
[src]
impl Header for IfMatch
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<IfMatch, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<IfMatch, Error>
impl Header for IfNoneMatch
[src]
impl Header for IfNoneMatch
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<IfNoneMatch, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<IfNoneMatch, Error>
impl Header for IfRange
[src]
impl Header for IfRange
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<IfRange, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<IfRange, Error>
impl Header for Pragma
[src]
impl Header for Pragma
impl Header for Range
[src]
impl Header for Range
impl Header for ReferrerPolicy
[src]
impl Header for ReferrerPolicy
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ReferrerPolicy, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ReferrerPolicy, Error>
impl Header for Vary
[src]
impl Header for Vary
impl Header for WebSocketVersion
[src]
impl Header for WebSocketVersion
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketVersion>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketVersion>
impl Header for WebSocketExtensions
[src]
impl Header for WebSocketExtensions
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketExtensions>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketExtensions>
impl Header for Accept
[src]
impl Header for Accept
impl Header for AcceptCharset
[src]
impl Header for AcceptCharset
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptCharset, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptCharset, Error>
impl Header for AcceptEncoding
[src]
impl Header for AcceptEncoding
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptEncoding, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptEncoding, Error>
impl Header for AcceptLanguage
[src]
impl Header for AcceptLanguage
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptLanguage, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptLanguage, Error>
impl Header for AcceptRanges
[src]
impl Header for AcceptRanges
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptRanges, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AcceptRanges, Error>
impl Header for AccessControlAllowCredentials
[src]
impl Header for AccessControlAllowCredentials
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowCredentials, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowCredentials, Error>
impl Header for AccessControlAllowHeaders
[src]
impl Header for AccessControlAllowHeaders
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowHeaders, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowHeaders, Error>
impl Header for AccessControlAllowMethods
[src]
impl Header for AccessControlAllowMethods
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowMethods, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowMethods, Error>
impl Header for AccessControlExposeHeaders
[src]
impl Header for AccessControlExposeHeaders
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlExposeHeaders, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlExposeHeaders, Error>
impl Header for AccessControlMaxAge
[src]
impl Header for AccessControlMaxAge
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlMaxAge, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlMaxAge, Error>
impl Header for AccessControlRequestHeaders
[src]
impl Header for AccessControlRequestHeaders
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlRequestHeaders, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlRequestHeaders, Error>
impl Header for AccessControlRequestMethod
[src]
impl Header for AccessControlRequestMethod
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlRequestMethod, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlRequestMethod, Error>
impl Header for Allow
[src]
impl Header for Allow
impl Header for CacheControl
[src]
impl Header for CacheControl
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<CacheControl, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<CacheControl, Error>
impl Header for Connection
[src]
impl Header for Connection
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Connection, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Connection, Error>
impl Header for ContentDisposition
[src]
impl Header for ContentDisposition
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentDisposition, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentDisposition, Error>
impl Header for ContentEncoding
[src]
impl Header for ContentEncoding
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentEncoding, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentEncoding, Error>
impl Header for ContentLanguage
[src]
impl Header for ContentLanguage
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentLanguage, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentLanguage, Error>
impl Header for ContentLength
[src]
impl Header for ContentLength
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentLength, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentLength, Error>
impl Header for ContentRange
[src]
impl Header for ContentRange
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentRange, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentRange, Error>
impl Header for ContentType
[src]
impl Header for ContentType
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentType, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<ContentType, Error>
impl Header for Cookie
[src]
impl Header for Cookie
impl Header for Date
[src]
impl Header for Date
impl Header for ETag
[src]
impl Header for ETag
impl Header for Expires
[src]
impl Header for Expires
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Expires, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Expires, Error>
impl Header for From
[src]
impl Header for From
impl Header for Host
[src]
impl Header for Host
impl Header for IfModifiedSince
[src]
impl Header for IfModifiedSince
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<IfModifiedSince, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<IfModifiedSince, Error>
impl Header for IfUnmodifiedSince
[src]
impl Header for IfUnmodifiedSince
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<IfUnmodifiedSince, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<IfUnmodifiedSince, Error>
impl Header for LastModified
[src]
impl Header for LastModified
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<LastModified, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<LastModified, Error>
impl Header for Link
[src]
impl Header for Link
impl Header for Location
[src]
impl Header for Location
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Location, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Location, Error>
impl Header for websocket::header::Origin
[src]
impl Header for websocket::header::Origin
impl Header for websocket::header::Origin
[src]
impl Header for websocket::header::Origin
impl Header for Prefer
[src]
impl Header for Prefer
impl Header for PreferenceApplied
[src]
impl Header for PreferenceApplied
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<PreferenceApplied, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<PreferenceApplied, Error>
impl Header for Referer
[src]
impl Header for Referer
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Referer, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Referer, Error>
impl Header for Server
[src]
impl Header for Server
impl Header for SetCookie
[src]
impl Header for SetCookie
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<SetCookie, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<SetCookie, Error>
impl Header for StrictTransportSecurity
[src]
impl Header for StrictTransportSecurity
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<StrictTransportSecurity, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<StrictTransportSecurity, Error>
impl Header for TransferEncoding
[src]
impl Header for TransferEncoding
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<TransferEncoding, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<TransferEncoding, Error>
impl Header for Upgrade
[src]
impl Header for Upgrade
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Upgrade, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Upgrade, Error>
impl Header for UserAgent
[src]
impl Header for UserAgent
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<UserAgent, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<UserAgent, Error>
impl Header for WebSocketAccept
[src]
impl Header for WebSocketAccept
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketAccept>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketAccept>
impl Header for WebSocketKey
[src]
impl Header for WebSocketKey
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketKey>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketKey>
impl Header for WebSocketProtocol
[src]
impl Header for WebSocketProtocol
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketProtocol>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketProtocol>
impl<S> Header for Authorization<S> where
S: Scheme + Any,
<S as FromStr>::Err: 'static,
[src]
impl<S> Header for Authorization<S> where
S: Scheme + Any,
<S as FromStr>::Err: 'static,
fn header_name() -> &'static str
[src]
fn header_name() -> &'static str
fn parse_header(raw: &[Vec<u8>]) -> Result<Authorization<S>, Error>
[src]
fn parse_header(raw: &[Vec<u8>]) -> Result<Authorization<S>, Error>