pub struct DisplayPad {
pub display_at: usize,
pub fill: char,
pub len: usize,
}Expand description
Display-only padding spliced into a ConcealedLine’s display text.
Generic engine capability: batteries that align display columns (e.g.
Markdown tables) return these from SyntaxHighlighter::expand_line;
the core splices the fill, remaps highlight spans, and extends the
source/display byte map, so painting, cursor placement, selection, and
hit-testing keep working unchanged. Padding bytes map back to the source
offset of the display byte they were inserted before, so clicks and typing
in padding land on that boundary.
Fields§
§display_at: usizeCollapsed-display byte offset the padding is inserted before
(0..=display_text.len(); snapped forward to a char boundary).
fill: charFill character repeated DisplayPad::len times (usually ' ').
len: usizeNumber of times DisplayPad::fill is repeated.
Trait Implementations§
Source§impl Clone for DisplayPad
impl Clone for DisplayPad
Source§fn clone(&self) -> DisplayPad
fn clone(&self) -> DisplayPad
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 DisplayPad
Source§impl Debug for DisplayPad
impl Debug for DisplayPad
impl Eq for DisplayPad
Source§impl PartialEq for DisplayPad
impl PartialEq for DisplayPad
Source§fn eq(&self, other: &DisplayPad) -> bool
fn eq(&self, other: &DisplayPad) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DisplayPad
Auto Trait Implementations§
impl Freeze for DisplayPad
impl RefUnwindSafe for DisplayPad
impl Send for DisplayPad
impl Sync for DisplayPad
impl Unpin for DisplayPad
impl UnsafeUnpin for DisplayPad
impl UnwindSafe for DisplayPad
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