Enum hyper::header::ContentRangeSpec [−][src]
pub enum ContentRangeSpec { Bytes { range: Option<(u64, u64)>, instance_length: Option<u64>, }, Unregistered { unit: String, resp: String, }, }
Content-Range, described in RFC7233
ABNF
Content-Range = byte-content-range
/ other-content-range
byte-content-range = bytes-unit SP
( byte-range-resp / unsatisfied-range )
byte-range-resp = byte-range "/" ( complete-length / "*" )
byte-range = first-byte-pos "-" last-byte-pos
unsatisfied-range = "*/" complete-length
complete-length = 1*DIGIT
other-content-range = other-range-unit SP other-range-resp
other-range-resp = *CHAR
Variants
Bytes
Byte range
Fields of Bytes
range: Option<(u64, u64)> | First and last bytes of the range, omitted if request could not be satisfied |
instance_length: Option<u64> | Total length of the instance, can be omitted if unknown |
Unregistered
Custom range, with unit not registered at IANA
Fields of Unregistered
unit: String | other-range-unit |
resp: String | other-range-resp |
Trait Implementations
impl PartialEq for ContentRangeSpec
[src]
impl PartialEq for ContentRangeSpec
fn eq(&self, other: &ContentRangeSpec) -> bool
[src]
fn eq(&self, other: &ContentRangeSpec) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ContentRangeSpec) -> bool
[src]
fn ne(&self, other: &ContentRangeSpec) -> bool
This method tests for !=
.
impl Clone for ContentRangeSpec
[src]
impl Clone for ContentRangeSpec
fn clone(&self) -> ContentRangeSpec
[src]
fn clone(&self) -> ContentRangeSpec
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for ContentRangeSpec
[src]
impl Debug for ContentRangeSpec
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for ContentRangeSpec
[src]
impl FromStr for ContentRangeSpec
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self>
[src]
fn from_str(s: &str) -> Result<Self>
Parses a string s
to return a value of this type. Read more
impl Display for ContentRangeSpec
[src]
impl Display for ContentRangeSpec
Auto Trait Implementations
impl Send for ContentRangeSpec
impl Send for ContentRangeSpec
impl Sync for ContentRangeSpec
impl Sync for ContentRangeSpec