Struct editor2::display_map::DisplaySnapshot
source · pub struct DisplaySnapshot {
pub buffer_snapshot: MultiBufferSnapshot,
pub fold_snapshot: FoldSnapshot,
/* private fields */
}
Fields§
§buffer_snapshot: MultiBufferSnapshot
§fold_snapshot: FoldSnapshot
Implementations§
source§impl DisplaySnapshot
impl DisplaySnapshot
pub fn is_empty(&self) -> bool
pub fn buffer_rows(&self, start_row: u32) -> DisplayBufferRows<'_> ⓘ
pub fn max_buffer_row(&self) -> u32
pub fn prev_line_boundary(&self, point: Point) -> (Point, DisplayPoint)
pub fn next_line_boundary(&self, point: Point) -> (Point, DisplayPoint)
pub fn expand_to_line(&self, range: Range<Point>) -> Range<Point> ⓘ
pub fn display_point_to_inlay_offset( &self, point: DisplayPoint, bias: Bias ) -> InlayOffset
pub fn anchor_to_inlay_offset(&self, anchor: Anchor) -> InlayOffset
pub fn display_point_to_fold_point( &self, point: DisplayPoint, bias: Bias ) -> FoldPoint
pub fn fold_point_to_display_point(&self, fold_point: FoldPoint) -> DisplayPoint
pub fn max_point(&self) -> DisplayPoint
sourcepub fn text_chunks(&self, display_row: u32) -> impl Iterator<Item = &str>
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
sourcepub fn reverse_text_chunks(
&self,
display_row: u32
) -> impl Iterator<Item = &str>
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
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> ⓘ
pub fn highlighted_chunks<'a>( &'a self, display_rows: Range<u32>, language_aware: bool, editor_style: &'a EditorStyle ) -> impl Iterator<Item = HighlightedChunk<'a>>
pub fn layout_row( &self, display_row: u32, _: &TextLayoutDetails ) -> Arc<LineLayout>
pub fn x_for_display_point( &self, display_point: DisplayPoint, text_layout_details: &TextLayoutDetails ) -> Pixels
pub fn display_column_for_x( &self, display_row: u32, x: Pixels, details: &TextLayoutDetails ) -> u32
pub fn chars_at( &self, point: DisplayPoint ) -> impl Iterator<Item = (char, DisplayPoint)> + '_
pub fn reverse_chars_at( &self, point: DisplayPoint ) -> impl Iterator<Item = (char, DisplayPoint)> + '_
pub fn column_to_chars(&self, display_row: u32, target: u32) -> u32
pub fn column_from_chars(&self, display_row: u32, char_count: u32) -> u32
pub fn clip_point(&self, point: DisplayPoint, bias: Bias) -> DisplayPoint
pub fn clip_at_line_end(&self, point: DisplayPoint) -> DisplayPoint
pub fn folds_in_range<T>(&self, range: Range<T>) -> impl Iterator<Item = &Fold>where T: ToOffset,
pub fn blocks_in_range( &self, rows: Range<u32> ) -> impl Iterator<Item = (u32, &TransformBlock)>
pub fn intersects_fold<T: ToOffset>(&self, offset: T) -> bool
pub fn is_line_folded(&self, buffer_row: u32) -> bool
pub fn is_block_line(&self, display_row: u32) -> bool
pub fn soft_wrap_indent(&self, display_row: u32) -> Option<u32>
pub fn text(&self) -> String
pub fn line(&self, display_row: u32) -> String
pub fn line_indent(&self, display_row: u32) -> (u32, bool)
pub fn line_indent_for_buffer_row(&self, buffer_row: u32) -> (u32, bool)
pub fn line_len(&self, row: u32) -> u32
pub fn longest_row(&self) -> u32
pub fn fold_for_line(&self, buffer_row: u32) -> Option<FoldStatus>
pub fn is_foldable(&self, buffer_row: u32) -> bool
pub fn foldable_range(&self, buffer_row: u32) -> Option<Range<Point>>
Auto Trait Implementations§
impl !RefUnwindSafe for DisplaySnapshot
impl !Send for DisplaySnapshot
impl !Sync for DisplaySnapshot
impl Unpin for DisplaySnapshot
impl !UnwindSafe for DisplaySnapshot
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