pub struct ByteRange { /* private fields */ }Expand description
Inclusive byte range.
Implementations§
Source§impl ByteRange
impl ByteRange
Sourcepub const fn new(start: u64, end_inclusive: u64) -> Result<Self, RangeError>
pub const fn new(start: u64, end_inclusive: u64) -> Result<Self, RangeError>
Creates an inclusive byte range.
§Errors
Returns RangeError::Inverted when end_inclusive is smaller than start.
Sourcepub const fn end_inclusive(&self) -> u64
pub const fn end_inclusive(&self) -> u64
Returns the inclusive final byte offset in the range.
Trait Implementations§
impl Copy for ByteRange
Source§impl<'de> Deserialize<'de> for ByteRange
impl<'de> Deserialize<'de> for ByteRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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