Enum ferrum::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

Byte range

Fields of Bytes

First and last bytes of the range, omitted if request could not be satisfied

Total length of the instance, can be omitted if unknown

Custom range, with unit not registered at IANA

Fields of Unregistered

other-range-unit

other-range-resp

Trait Implementations

impl Clone for ContentRangeSpec
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<ContentRangeSpec> for ContentRangeSpec
[src]

[src]

[src]

impl FromStr for ContentRangeSpec
[src]

impl Debug for ContentRangeSpec
[src]

[src]

Formats the value using the given formatter.

impl Display for ContentRangeSpec
[src]

[src]

Formats the value using the given formatter. Read more