pub struct ByteRange {
pub start: u64,
pub end: u64,
}Expand description
Byte range for partial reads
Fields§
§start: u64Start offset (inclusive)
end: u64End offset (exclusive)
Implementations§
Source§impl ByteRange
impl ByteRange
Sourcepub const fn from_offset_length(offset: u64, length: u64) -> Self
pub const fn from_offset_length(offset: u64, length: u64) -> Self
Creates a byte range from an offset and length
Sourcepub const fn overlaps(&self, other: &Self) -> bool
pub const fn overlaps(&self, other: &Self) -> bool
Returns true if this range overlaps with another
Sourcepub const fn is_adjacent(&self, other: &Self) -> bool
pub const fn is_adjacent(&self, other: &Self) -> bool
Returns true if this range is adjacent to another
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