pub struct HttpByteRange { /* private fields */ }Expand description
A resolved inclusive byte range for one representation.
Implementations§
Source§impl HttpByteRange
impl HttpByteRange
Sourcepub fn new(
start: u64,
end: u64,
total_size: u64,
) -> Result<Self, HttpRangeError>
pub fn new( start: u64, end: u64, total_size: u64, ) -> Result<Self, HttpRangeError>
Creates a resolved byte range and validates it against the representation length.
pub const fn start(self) -> u64
pub const fn end(self) -> u64
pub const fn length(self) -> u64
pub const fn total_size(self) -> u64
Sourcepub fn content_range_header(self) -> String
pub fn content_range_header(self) -> String
Renders the value required by a successful Content-Range response header.
Trait Implementations§
Source§impl Clone for HttpByteRange
impl Clone for HttpByteRange
Source§fn clone(&self) -> HttpByteRange
fn clone(&self) -> HttpByteRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HttpByteRange
impl Debug for HttpByteRange
Source§impl PartialEq for HttpByteRange
impl PartialEq for HttpByteRange
Source§fn eq(&self, other: &HttpByteRange) -> bool
fn eq(&self, other: &HttpByteRange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for HttpByteRange
impl Eq for HttpByteRange
impl StructuralPartialEq for HttpByteRange
Auto Trait Implementations§
impl Freeze for HttpByteRange
impl RefUnwindSafe for HttpByteRange
impl Send for HttpByteRange
impl Sync for HttpByteRange
impl Unpin for HttpByteRange
impl UnsafeUnpin for HttpByteRange
impl UnwindSafe for HttpByteRange
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