Enum saphir::file::content_range::ContentRange
source · pub enum ContentRange {
Bytes {
range: Option<(u64, u64)>,
instance_length: Option<u64>,
},
Unregistered {
unit: String,
resp: String,
},
}
Available on crate feature
file
only.Expand description
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
Fields
Byte range
Unregistered
Custom range, with unit not registered at IANA
Trait Implementations§
source§impl Clone for ContentRange
impl Clone for ContentRange
source§fn clone(&self) -> ContentRange
fn clone(&self) -> ContentRange
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 ContentRange
impl Debug for ContentRange
source§impl FromStr for ContentRange
impl FromStr for ContentRange
§type Err = SaphirError
type Err = SaphirError
The associated error which can be returned from parsing.
source§impl PartialEq<ContentRange> for ContentRange
impl PartialEq<ContentRange> for ContentRange
source§fn eq(&self, other: &ContentRange) -> bool
fn eq(&self, other: &ContentRange) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToString for ContentRange
impl ToString for ContentRange
impl Eq for ContentRange
impl StructuralEq for ContentRange
impl StructuralPartialEq for ContentRange
Auto Trait Implementations§
impl RefUnwindSafe for ContentRange
impl Send for ContentRange
impl Sync for ContentRange
impl Unpin for ContentRange
impl UnwindSafe for ContentRange
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.