#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct RingCursor {
next_counter: u64,
}
impl RingCursor {
pub const fn from_start() -> Self {
Self { next_counter: 0 }
}
pub const fn from_counter(next_counter: u64) -> Self {
Self { next_counter }
}
pub const fn next_counter(self) -> u64 {
self.next_counter
}
pub(crate) fn set_next_counter(&mut self, next_counter: u64) {
self.next_counter = next_counter;
}
}