pub struct Position(/* private fields */);Implementations§
Source§impl Position
impl Position
pub const ZERO: Position
Sourcepub const MAX: Position
pub const MAX: Position
The largest representable position, the dual of ZERO. Used as the
“from the tip” sentinel for a backwards read: read_back(query, Position::MAX, limit)
starts at the current durable tip, since the read is always clamped to the pinned
watermark anyway.
pub fn new(n: u64) -> Self
pub fn get(self) -> u64
pub fn next(self) -> Position
pub fn offset_from(self, base: Position) -> u64
Trait Implementations§
impl Copy for Position
impl Eq for Position
Source§impl Ord for Position
impl Ord for Position
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Position
impl PartialOrd for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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