pub struct Gutter { /* private fields */ }Expand description
The gutter: components in draw order.
Implementations§
Source§impl Gutter
impl Gutter
pub fn new(components: Vec<GutterComponent>) -> Self
Sourcepub fn width(&self, line_count: usize) -> usize
pub fn width(&self, line_count: usize) -> usize
Total cells, summed across components. Zero for an empty gutter, which is how the column is turned off without a second code path.
Sourcepub fn render_line(
&self,
line: usize,
cursor_line: usize,
line_count: usize,
theme: &ThemeColors,
) -> Vec<Span<'static>>
pub fn render_line( &self, line: usize, cursor_line: usize, line_count: usize, theme: &ThemeColors, ) -> Vec<Span<'static>>
The spans for one buffer line.
Trait Implementations§
impl Eq for Gutter
impl StructuralPartialEq for Gutter
Auto Trait Implementations§
impl Freeze for Gutter
impl RefUnwindSafe for Gutter
impl Send for Gutter
impl Sync for Gutter
impl Unpin for Gutter
impl UnsafeUnpin for Gutter
impl UnwindSafe for Gutter
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> 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.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