#[non_exhaustive]pub struct ByteRange {
pub first: u64,
pub last: Option<u64>,
}Expand description
A single byte range first-last (RFC 7233 2.1), inclusive.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.first: u64First byte.
last: Option<u64>Last byte; None for the open-ended form first-.
Implementations§
Source§impl ByteRange
impl ByteRange
Sourcepub fn offset_len(&self) -> Result<(u64, u64), Unsupported>
pub fn offset_len(&self) -> Result<(u64, u64), Unsupported>
The closed (offset, length) form, or the typed unsupported error for
an open-ended range.
§Errors
Trait Implementations§
impl Copy for ByteRange
impl Eq for ByteRange
impl StructuralPartialEq for ByteRange
Auto Trait Implementations§
impl Forget for ByteRange
impl Freeze for ByteRange
impl Move for ByteRange
impl RefUnwindSafe for ByteRange
impl Send for ByteRange
impl Sync for ByteRange
impl Unpin for ByteRange
impl UnsafeUnpin for ByteRange
impl UnwindSafe for ByteRange
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