pub struct TextRev(pub u64);Expand description
A single open text buffer. A monotonic counter of TEXT changes to one buffer.
Deliberately distinct from escriba-core’s EditGen, which is a REFRESH
generation: that one bumps on every action, including pure cursor moves,
because its job is telling the renderer when to repaint. Keying staleness
on it would mark every cached offset stale after any keypress — noise, not
staleness.
This one bumps if and only if the rope changed, which is the question an offset actually needs answered: “is the text I was measured against still the text?”
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
impl Copy for TextRev
impl Eq for TextRev
Source§impl Ord for TextRev
impl Ord for TextRev
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 TextRev
impl PartialOrd for TextRev
impl StructuralPartialEq for TextRev
Auto Trait Implementations§
impl Freeze for TextRev
impl RefUnwindSafe for TextRev
impl Send for TextRev
impl Sync for TextRev
impl Unpin for TextRev
impl UnsafeUnpin for TextRev
impl UnwindSafe for TextRev
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