pub struct DisplayRow(/* private fields */);Expand description
A display row, 0-based. In the tab-only map: DisplayRow(r) ⇔ buffer row
r.
A distinct newtype because the FoldMap layer breaks that 1:1 — a folded
row hides buffer rows beneath it — so every site that would otherwise assume
display row equals buffer row is a compile error to revisit. The field is
pub(crate): consumer crates can read a display row
(DisplayRow::index) but can never mint one from arithmetic — every
display row in existence came out of a FoldMap/TabMap method, so “anchor
something at a buffer row × line height” is a compile error rather than
something to catch by eye. This keeps popups and other row-anchored chrome
correctly offset when a fold sits above them.
Implementations§
Trait Implementations§
Source§impl Clone for DisplayRow
impl Clone for DisplayRow
Source§fn clone(&self) -> DisplayRow
fn clone(&self) -> DisplayRow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DisplayRow
Source§impl Debug for DisplayRow
impl Debug for DisplayRow
impl Eq for DisplayRow
Source§impl Hash for DisplayRow
impl Hash for DisplayRow
Source§impl Ord for DisplayRow
impl Ord for DisplayRow
Source§fn cmp(&self, other: &DisplayRow) -> Ordering
fn cmp(&self, other: &DisplayRow) -> Ordering
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 PartialEq for DisplayRow
impl PartialEq for DisplayRow
Source§impl PartialOrd for DisplayRow
impl PartialOrd for DisplayRow
impl StructuralPartialEq for DisplayRow
Auto Trait Implementations§
impl Freeze for DisplayRow
impl RefUnwindSafe for DisplayRow
impl Send for DisplayRow
impl Sync for DisplayRow
impl Unpin for DisplayRow
impl UnsafeUnpin for DisplayRow
impl UnwindSafe for DisplayRow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.