pub enum ByteRange {
Full,
From(u64),
Range {
offset: u64,
len: u64,
},
}Expand description
Which bytes of an object a download should cover.
Used by the backend’s download / read-range primitives to express whole-file, resume, and bounded-window reads with one type. The façade’s download conveniences all desugar to this.
Variants§
Full
The whole object, [0, size).
From(u64)
From offset to end-of-file, [offset, size).
Range
A bounded slice [offset, offset + len) (clamped to the object size by the backend).
Trait Implementations§
impl Copy for ByteRange
impl Eq for ByteRange
impl StructuralPartialEq for ByteRange
Auto Trait Implementations§
impl Freeze 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