pub struct ContentRange { /* private fields */ }Expand description
A container for the payload range and the optional Content-Range header.
The header is None only if the body was not sliced.
Implementations§
Source§impl ContentRange
impl ContentRange
Sourcepub fn header(&self) -> Option<HttpContentRange>
pub fn header(&self) -> Option<HttpContentRange>
Returns an option of HttpContentRange.
If it’s None the provided HttpRange was None too.
Sourcepub fn range(&self) -> &RangeInclusive<u64>
pub fn range(&self) -> &RangeInclusive<u64>
Returns a RangeInclusive of u64 useful to manually slice the response body.
Trait Implementations§
Source§impl Clone for ContentRange
impl Clone for ContentRange
Source§fn clone(&self) -> ContentRange
fn clone(&self) -> ContentRange
Returns a duplicate 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 PartialEq for ContentRange
impl PartialEq for ContentRange
impl Eq for ContentRange
impl StructuralPartialEq for ContentRange
Auto Trait Implementations§
impl Freeze for ContentRange
impl RefUnwindSafe for ContentRange
impl Send for ContentRange
impl Sync for ContentRange
impl Unpin for ContentRange
impl UnwindSafe for ContentRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more