pub struct RangeRecord {
pub idx: u64,
pub start: u64,
pub end: u64,
pub state: RangeState,
pub bytes_written: u64,
}Fields§
§idx: u64§start: u64§end: u64Inclusive. OPEN_END when the total size is unknown.
state: RangeState§bytes_written: u64Durable prefix, in bytes, from start. Never in-flight bytes.
Implementations§
Source§impl RangeRecord
impl RangeRecord
Sourcepub fn size(&self) -> u64
pub fn size(&self) -> u64
Byte length of the range. Named size rather than len because a range
is never empty, so an is_empty counterpart would be meaningless.
pub fn is_open_ended(&self) -> bool
Sourcepub fn resume_at(&self) -> u64
pub fn resume_at(&self) -> u64
Where a worker picking this range up should ask the server to start.
pub fn remaining(&self) -> u64
Trait Implementations§
Source§impl Clone for RangeRecord
impl Clone for RangeRecord
Source§fn clone(&self) -> RangeRecord
fn clone(&self) -> RangeRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RangeRecord
Source§impl Debug for RangeRecord
impl Debug for RangeRecord
impl Eq for RangeRecord
Source§impl PartialEq for RangeRecord
impl PartialEq for RangeRecord
Source§impl Serialize for RangeRecord
impl Serialize for RangeRecord
impl StructuralPartialEq for RangeRecord
Auto Trait Implementations§
impl Freeze for RangeRecord
impl RefUnwindSafe for RangeRecord
impl Send for RangeRecord
impl Sync for RangeRecord
impl Unpin for RangeRecord
impl UnsafeUnpin for RangeRecord
impl UnwindSafe for RangeRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.