pub enum Offset {
Start,
Now,
Concrete {
read_seq: u64,
byte_offset: u64,
raw: [u8; 33],
},
}Expand description
Offset value with validated format.
Canonical format: {read_seq:016x}_{byte_offset:016x}.
Sentinels: -1 (stream start), now (tail/live).
Variants§
Implementations§
Source§impl Offset
impl Offset
Sourcepub fn new(read_seq: u64, byte_offset: u64) -> Self
pub fn new(read_seq: u64, byte_offset: u64) -> Self
Create a new offset from read sequence and byte offset.
Sourcepub fn is_sentinel(&self) -> bool
pub fn is_sentinel(&self) -> bool
Check if this is a sentinel value (start or now)
Sourcepub fn parse_components(&self) -> Option<(u64, u64)>
pub fn parse_components(&self) -> Option<(u64, u64)>
Parse the offset into (read_seq, byte_offset) components.
Returns None for sentinel values.
Trait Implementations§
Source§impl Ord for Offset
impl Ord for Offset
Source§impl PartialOrd for Offset
impl PartialOrd for Offset
impl Eq for Offset
Auto Trait Implementations§
impl Freeze for Offset
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnsafeUnpin for Offset
impl UnwindSafe for Offset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.