Enum iron::headers::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

Byte range

Fields

Custom range, with unit not registered at IANA

Fields

Trait Implementations

impl Debug for ContentRangeSpec

Formats the value using the given formatter.

impl Clone for ContentRangeSpec

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq<ContentRangeSpec> for ContentRangeSpec

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl FromStr for ContentRangeSpec

impl Display for ContentRangeSpec

Formats the value using the given formatter.