pub struct Segments(/* private fields */);Expand description
Holds a list of disjunctive [start, end) segments covering the received file
Implementations§
Source§impl Segments
impl Segments
pub fn new() -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn end(&self) -> Option<u64>
pub fn end(&self) -> Option<u64>
return the end of the last segment or None if there is no segment
Sourcepub fn is_complete(&self, size: u64) -> bool
pub fn is_complete(&self, size: u64) -> bool
return true if there is only one segment whose end is the given size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Segments
impl RefUnwindSafe for Segments
impl Send for Segments
impl Sync for Segments
impl Unpin for Segments
impl UnsafeUnpin for Segments
impl UnwindSafe for Segments
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