pub struct LineDecoration { /* private fields */ }Expand description
A decoration of one whole buffer row: a background band, a gutter icon, or both.
Implementations§
Source§impl LineDecoration
impl LineDecoration
Sourcepub fn background(&self) -> Option<Hsla>
pub fn background(&self) -> Option<Hsla>
The color of the background band, if any.
Sourcepub fn gutter_icon(&self) -> Option<(&SharedString, Hsla)>
pub fn gutter_icon(&self) -> Option<(&SharedString, Hsla)>
The SVG asset path and color of the gutter icon, if any.
Sourcepub fn with_background(self, color: Hsla) -> Self
pub fn with_background(self, color: Hsla) -> Self
Paint a band of color across the whole row.
Sourcepub fn with_gutter_icon(
self,
icon: impl Into<SharedString>,
color: Hsla,
) -> Self
pub fn with_gutter_icon( self, icon: impl Into<SharedString>, color: Hsla, ) -> Self
Paint the SVG asset at icon, for example icons/plus.svg, in color
in the row’s gutter.
The icon is painted only if the provider returns true from
LineDecorationProvider::has_gutter_icons.
Trait Implementations§
Source§impl Clone for LineDecoration
impl Clone for LineDecoration
Source§impl Debug for LineDecoration
impl Debug for LineDecoration
Source§impl PartialEq for LineDecoration
impl PartialEq for LineDecoration
impl StructuralPartialEq for LineDecoration
Auto Trait Implementations§
impl Forget for LineDecoration
impl Freeze for LineDecoration
impl Move for LineDecoration
impl RefUnwindSafe for LineDecoration
impl Send for LineDecoration
impl Sync for LineDecoration
impl Unpin for LineDecoration
impl UnsafeUnpin for LineDecorationwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for LineDecoration
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