pub struct IndentGuides {
pub blocks: Arc<[IndentBlock]>,
pub rows: Arc<[Arc<[GuideMark]>]>,
pub covered_start: u32,
pub version: MatrixVersion,
}Expand description
The per-pane guide layer.
Fields§
§blocks: Arc<[IndentBlock]>Every block reaching into the covered window, ordered by opener then
column. Retained alongside Self::rows because the active-block pick
needs extents, not just painted columns.
rows: Arc<[Arc<[GuideMark]>]>Painted marks per covered source line: rows[line - covered_start].
Already filtered through IndentBlock::paints_on, so every mark
lands on a blank cell.
covered_start: u32Source line rows[0] describes.
version: MatrixVersionThe stamp of the display matrix built alongside this layer.
Implementations§
Source§impl IndentGuides
impl IndentGuides
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn marks_for_line(&self, source_line: u32) -> &[GuideMark]
pub fn marks_for_line(&self, source_line: u32) -> &[GuideMark]
Marks painted on source_line, or &[] when the line is outside the
covered window. Outside-the-window is the normal answer during a
scroll that has outrun the worker, not an error.
Sourcepub fn active_block(&self, cursor_line: u32) -> Option<u16>
pub fn active_block(&self, cursor_line: u32) -> Option<u16>
Index of the innermost block containing cursor_line, or None when
the cursor is not inside any block (top-level code).
Innermost is the greatest column: nesting deeper always means a guide further right, whatever the indent widths involved.
Trait Implementations§
Source§impl Clone for IndentGuides
impl Clone for IndentGuides
Source§fn clone(&self) -> IndentGuides
fn clone(&self) -> IndentGuides
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndentGuides
impl Debug for IndentGuides
Auto Trait Implementations§
impl Freeze for IndentGuides
impl RefUnwindSafe for IndentGuides
impl Send for IndentGuides
impl Sync for IndentGuides
impl Unpin for IndentGuides
impl UnsafeUnpin for IndentGuides
impl UnwindSafe for IndentGuides
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
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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