pub struct ReadPosition(/* private fields */);
Expand description
A read position in a queue.
Implementations§
Source§impl ReadPosition
impl ReadPosition
Sourcepub fn is_past(&self, write: &WritePosition) -> Option<bool>
pub fn is_past(&self, write: &WritePosition) -> Option<bool>
A WritePosition
can be compared to a ReadPosition
correctly if
the ring buffer wrapped around at most 2³¹ (2 to the power of 31) times.
Returns None
if the read position and the write position cannot be compared,
Some(true)
if the read position is strictly higher than the write position,
Some(false)
otherwise
Auto Trait Implementations§
impl Freeze for ReadPosition
impl RefUnwindSafe for ReadPosition
impl Send for ReadPosition
impl Sync for ReadPosition
impl Unpin for ReadPosition
impl UnwindSafe for ReadPosition
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