pub struct DisplaySnapshot {
    pub buffer_snapshot: MultiBufferSnapshot,
    pub fold_snapshot: FoldSnapshot,
    /* private fields */
}

Fields§

§buffer_snapshot: MultiBufferSnapshot§fold_snapshot: FoldSnapshot

Implementations§

source§

impl DisplaySnapshot

source

pub fn is_empty(&self) -> bool

source

pub fn buffer_rows(&self, start_row: u32) -> DisplayBufferRows<'_>

source

pub fn max_buffer_row(&self) -> u32

source

pub fn prev_line_boundary(&self, point: Point) -> (Point, DisplayPoint)

source

pub fn next_line_boundary(&self, point: Point) -> (Point, DisplayPoint)

source

pub fn expand_to_line(&self, range: Range<Point>) -> Range<Point>

source

pub fn display_point_to_inlay_offset( &self, point: DisplayPoint, bias: Bias ) -> InlayOffset

source

pub fn anchor_to_inlay_offset(&self, anchor: Anchor) -> InlayOffset

source

pub fn display_point_to_fold_point( &self, point: DisplayPoint, bias: Bias ) -> FoldPoint

source

pub fn fold_point_to_display_point(&self, fold_point: FoldPoint) -> DisplayPoint

source

pub fn max_point(&self) -> DisplayPoint

source

pub fn text_chunks(&self, display_row: u32) -> impl Iterator<Item = &str>

Returns text chunks starting at the given display row until the end of the file

source

pub fn reverse_text_chunks( &self, display_row: u32 ) -> impl Iterator<Item = &str>

Returns text chunks starting at the end of the given display row in reverse until the start of the file

source

pub fn chunks<'a>( &'a self, display_rows: Range<u32>, language_aware: bool, inlay_highlight_style: Option<HighlightStyle>, suggestion_highlight_style: Option<HighlightStyle> ) -> DisplayChunks<'a>

source

pub fn highlighted_chunks<'a>( &'a self, display_rows: Range<u32>, language_aware: bool, editor_style: &'a EditorStyle ) -> impl Iterator<Item = HighlightedChunk<'a>>

source

pub fn layout_row( &self, display_row: u32, _: &TextLayoutDetails ) -> Arc<LineLayout>

source

pub fn x_for_display_point( &self, display_point: DisplayPoint, text_layout_details: &TextLayoutDetails ) -> Pixels

source

pub fn display_column_for_x( &self, display_row: u32, x: Pixels, details: &TextLayoutDetails ) -> u32

source

pub fn chars_at( &self, point: DisplayPoint ) -> impl Iterator<Item = (char, DisplayPoint)> + '_

source

pub fn reverse_chars_at( &self, point: DisplayPoint ) -> impl Iterator<Item = (char, DisplayPoint)> + '_

source

pub fn column_to_chars(&self, display_row: u32, target: u32) -> u32

source

pub fn column_from_chars(&self, display_row: u32, char_count: u32) -> u32

source

pub fn clip_point(&self, point: DisplayPoint, bias: Bias) -> DisplayPoint

source

pub fn clip_at_line_end(&self, point: DisplayPoint) -> DisplayPoint

source

pub fn folds_in_range<T>(&self, range: Range<T>) -> impl Iterator<Item = &Fold>where T: ToOffset,

source

pub fn blocks_in_range( &self, rows: Range<u32> ) -> impl Iterator<Item = (u32, &TransformBlock)>

source

pub fn intersects_fold<T: ToOffset>(&self, offset: T) -> bool

source

pub fn is_line_folded(&self, buffer_row: u32) -> bool

source

pub fn is_block_line(&self, display_row: u32) -> bool

source

pub fn soft_wrap_indent(&self, display_row: u32) -> Option<u32>

source

pub fn text(&self) -> String

source

pub fn line(&self, display_row: u32) -> String

source

pub fn line_indent(&self, display_row: u32) -> (u32, bool)

source

pub fn line_indent_for_buffer_row(&self, buffer_row: u32) -> (u32, bool)

source

pub fn line_len(&self, row: u32) -> u32

source

pub fn longest_row(&self) -> u32

source

pub fn fold_for_line(&self, buffer_row: u32) -> Option<FoldStatus>

source

pub fn is_foldable(&self, buffer_row: u32) -> bool

source

pub fn foldable_range(&self, buffer_row: u32) -> Option<Range<Point>>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,