Struct salvo::http::headers::AcceptRanges [−][src]
pub struct AcceptRanges(_);
Expand description
Accept-Ranges
header, defined in RFC7233
The Accept-Ranges
header field allows a server to indicate that it
supports range requests for the target resource.
ABNF
Accept-Ranges = acceptable-ranges
acceptable-ranges = 1#range-unit / \"none\"
* `bytes`
* `none`
* `unknown-unit`
Examples
use headers::{AcceptRanges, HeaderMap, HeaderMapExt};
let mut headers = HeaderMap::new();
headers.typed_insert(AcceptRanges::bytes());
Implementations
A constructor to easily create the common Accept-Ranges: bytes
header.
Trait Implementations
The name of this header.
pub fn decode<'i, I>(values: &mut I) -> Result<AcceptRanges, Error> where
I: Iterator<Item = &'i HeaderValue>,
pub fn decode<'i, I>(values: &mut I) -> Result<AcceptRanges, Error> where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of HeaderValue
s.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for AcceptRanges
impl Send for AcceptRanges
impl Sync for AcceptRanges
impl Unpin for AcceptRanges
impl UnwindSafe for AcceptRanges
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more