pub struct Spacer { /* private fields */ }Expand description
Blank rows an editor shows above or below a buffer line.
A spacer row holds no text: it has no line number, the caret never stands on it, and line decorations, selections and search matches pass it by. Two editors shown side by side pad their shorter lines with spacers, so that lines paired across them start level however each one wraps.
Implementations§
Source§impl Spacer
impl Spacer
Sourcepub fn below(line: usize, rows: usize) -> Self
pub fn below(line: usize, rows: usize) -> Self
Create rows blank rows below a zero-based buffer line, after its last
soft-wrapped row.
Sourcepub fn above(line: usize, rows: usize) -> Self
pub fn above(line: usize, rows: usize) -> Self
Create rows blank rows above a zero-based buffer line, before its first
row.
Sourcepub fn background(&self) -> Option<Hsla>
pub fn background(&self) -> Option<Hsla>
The color the rows are filled with, if any.
Sourcepub fn with_background(self, color: Hsla) -> Self
pub fn with_background(self, color: Hsla) -> Self
Fill the rows with color, gutter included.
Trait Implementations§
impl StructuralPartialEq for Spacer
Auto Trait Implementations§
impl Forget for Spacer
impl Freeze for Spacer
impl Move for Spacer
impl RefUnwindSafe for Spacer
impl Send for Spacer
impl Sync for Spacer
impl Unpin for Spacer
impl UnsafeUnpin for Spacer
impl UnwindSafe for Spacer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more