Enum edge::header::ContentRangeSpec [] [src]

pub enum ContentRangeSpec {
    pub Bytes {
        pub range: Option<(u64, u64)>,
        pub instance_length: Option<u64>,
    },
    pub Unregistered {
        pub unit: String,
        pub 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

range
instance_length
Unregistered

Custom range, with unit not registered at IANA

Fields

unit
resp

Trait Implementations

impl FromStr for ContentRangeSpec

type Err = Error

fn from_str(s: &str) -> Result<ContentRangeSpec, Error>

impl Display for ContentRangeSpec

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

Derived Implementations

impl Debug for ContentRangeSpec

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl Clone for ContentRangeSpec

fn clone(&self) -> ContentRangeSpec

1.0.0fn clone_from(&mut self, source: &Self)

impl PartialEq<ContentRangeSpec> for ContentRangeSpec

fn eq(&self, __arg_0: &ContentRangeSpec) -> bool

fn ne(&self, __arg_0: &ContentRangeSpec) -> bool