pub struct OffsetRange(pub u64, pub u64);Expand description
A range defined by an offset and a length.
Tuple Fields§
§0: u64§1: u64Implementations§
Source§impl OffsetRange
impl OffsetRange
pub fn new(offset: u64, len: u64) -> Self
Sourcepub fn start(&self) -> u64
pub fn start(&self) -> u64
Returns the index of the first item within the range
use condow_core::OffsetRange;
let range = OffsetRange::new(4, 6);
assert_eq!(range.start(), 4);Trait Implementations§
Source§impl Clone for OffsetRange
impl Clone for OffsetRange
Source§fn clone(&self) -> OffsetRange
fn clone(&self) -> OffsetRange
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 OffsetRange
impl Debug for OffsetRange
Source§impl Display for OffsetRange
impl Display for OffsetRange
Source§impl From<OffsetRange> for DownloadRange
impl From<OffsetRange> for DownloadRange
Source§fn from(r: OffsetRange) -> Self
fn from(r: OffsetRange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OffsetRange
impl PartialEq for OffsetRange
impl Copy for OffsetRange
impl Eq for OffsetRange
impl StructuralPartialEq for OffsetRange
Auto Trait Implementations§
impl Freeze for OffsetRange
impl RefUnwindSafe for OffsetRange
impl Send for OffsetRange
impl Sync for OffsetRange
impl Unpin for OffsetRange
impl UnwindSafe for OffsetRange
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