Struct headers_accept_encoding::AcceptRanges
source · 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\"
# Example values
* `bytes`
* `none`
* `unknown-unit`
Examples
use headers::{AcceptRanges, HeaderMap, HeaderMapExt};
let mut headers = HeaderMap::new();
headers.typed_insert(AcceptRanges::bytes());
Implementations§
source§impl AcceptRanges
impl AcceptRanges
Trait Implementations§
source§impl Clone for AcceptRanges
impl Clone for AcceptRanges
source§fn clone(&self) -> AcceptRanges
fn clone(&self) -> AcceptRanges
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AcceptRanges
impl Debug for AcceptRanges
source§impl Header for AcceptRanges
impl Header for AcceptRanges
source§impl PartialEq<AcceptRanges> for AcceptRanges
impl PartialEq<AcceptRanges> for AcceptRanges
source§fn eq(&self, other: &AcceptRanges) -> bool
fn eq(&self, other: &AcceptRanges) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.