Struct Cursor
pub struct Cursor(pub u64);Expand description
A position in a study’s change log.
Opaque and monotone: the only meaningful operations are “hand it back to
Storage::sync” and “compare it with another one”. Cursor::BEGIN is
the zero value and means nothing has been seen yet, so a fresh
StudyView starts there and a first sync
returns the whole study.
use atune_core::storage::Cursor;
assert_eq!(Cursor::default(), Cursor::BEGIN);
assert!(Cursor::new(1) > Cursor::BEGIN);Tuple Fields§
§0: u64Implementations§
Trait Implementations§
impl Copy for Cursor
§impl<'de> Deserialize<'de> for Cursor
impl<'de> Deserialize<'de> for Cursor
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Cursor
§impl Ord for Cursor
impl Ord for Cursor
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
§impl PartialOrd for Cursor
impl PartialOrd for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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