Struct language2::TextBufferSnapshot
source · pub struct TextBufferSnapshot {
pub version: Global,
/* private fields */
}
Fields§
§version: Global
Implementations§
source§impl BufferSnapshot
impl BufferSnapshot
pub fn as_rope(&self) -> &Rope
pub fn remote_id(&self) -> u64
pub fn replica_id(&self) -> u16
pub fn row_count(&self) -> u32
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn chars(&self) -> impl Iterator<Item = char>
pub fn chars_for_range<T>(&self, range: Range<T>) -> impl Iterator<Item = char>where T: ToOffset,
pub fn reversed_chars_for_range<T>( &self, range: Range<T> ) -> impl Iterator<Item = char>where T: ToOffset,
pub fn contains_str_at<T>(&self, position: T, needle: &str) -> boolwhere T: ToOffset,
pub fn common_prefix_at<T>(&self, position: T, needle: &str) -> Range<T>where T: ToOffset + TextDimension,
pub fn text(&self) -> String
pub fn line_ending(&self) -> LineEnding
pub fn deleted_text(&self) -> String
pub fn fragments(&self) -> impl Iterator<Item = &Fragment>
pub fn text_summary(&self) -> TextSummary
pub fn max_point(&self) -> Point
pub fn max_point_utf16(&self) -> PointUtf16
pub fn point_to_offset(&self, point: Point) -> usize
pub fn point_utf16_to_offset(&self, point: PointUtf16) -> usize
pub fn unclipped_point_utf16_to_offset( &self, point: Unclipped<PointUtf16> ) -> usize
pub fn unclipped_point_utf16_to_point( &self, point: Unclipped<PointUtf16> ) -> Point
pub fn offset_utf16_to_offset(&self, offset: OffsetUtf16) -> usize
pub fn offset_to_offset_utf16(&self, offset: usize) -> OffsetUtf16
pub fn offset_to_point(&self, offset: usize) -> Point
pub fn offset_to_point_utf16(&self, offset: usize) -> PointUtf16
pub fn point_to_point_utf16(&self, point: Point) -> PointUtf16
pub fn version(&self) -> &Global
pub fn chars_at<T>(&self, position: T) -> impl Iterator<Item = char>where T: ToOffset,
pub fn reversed_chars_at<T>(&self, position: T) -> impl Iterator<Item = char>where T: ToOffset,
pub fn reversed_chunks_in_range<T>(&self, range: Range<T>) -> Chunks<'_> ⓘwhere T: ToOffset,
pub fn bytes_in_range<T>(&self, range: Range<T>) -> Bytes<'_> ⓘwhere T: ToOffset,
pub fn reversed_bytes_in_range<T>(&self, range: Range<T>) -> Bytes<'_> ⓘwhere T: ToOffset,
pub fn text_for_range<T>(&self, range: Range<T>) -> Chunks<'_> ⓘwhere T: ToOffset,
pub fn line_len(&self, row: u32) -> u32
pub fn is_line_blank(&self, row: u32) -> bool
pub fn text_summary_for_range<D, O>(&self, range: Range<O>) -> Dwhere O: ToOffset, D: TextDimension,
pub fn summaries_for_anchors<'a, D, A>( &'a self, anchors: A ) -> impl Iterator<Item = D> + 'awhere D: 'a + TextDimension, A: 'a + IntoIterator<Item = &'a Anchor>,
pub fn summaries_for_anchors_with_payload<'a, D, A, T>( &'a self, anchors: A ) -> impl Iterator<Item = (D, T)> + 'awhere D: 'a + TextDimension, A: 'a + IntoIterator<Item = (&'a Anchor, T)>,
pub fn anchor_before<T>(&self, position: T) -> Anchorwhere T: ToOffset,
pub fn anchor_after<T>(&self, position: T) -> Anchorwhere T: ToOffset,
pub fn anchor_at<T>(&self, position: T, bias: Bias) -> Anchorwhere T: ToOffset,
pub fn can_resolve(&self, anchor: &Anchor) -> bool
pub fn clip_offset(&self, offset: usize, bias: Bias) -> usize
pub fn clip_point(&self, point: Point, bias: Bias) -> Point
pub fn clip_offset_utf16(&self, offset: OffsetUtf16, bias: Bias) -> OffsetUtf16
pub fn clip_point_utf16( &self, point: Unclipped<PointUtf16>, bias: Bias ) -> PointUtf16
pub fn edits_since<D, 'a>( &'a self, since: &'a Global ) -> impl Iterator<Item = Edit<D>> + 'awhere D: TextDimension + Ord,
pub fn anchored_edits_since<D, 'a>( &'a self, since: &'a Global ) -> impl Iterator<Item = (Edit<D>, Range<Anchor>)> + 'awhere D: TextDimension + Ord,
pub fn edits_since_in_range<D, 'a>( &'a self, since: &'a Global, range: Range<Anchor> ) -> impl Iterator<Item = Edit<D>> + 'awhere D: TextDimension + Ord,
pub fn anchored_edits_since_in_range<D, 'a>( &'a self, since: &'a Global, range: Range<Anchor> ) -> impl Iterator<Item = (Edit<D>, Range<Anchor>)> + 'awhere D: TextDimension + Ord,
Trait Implementations§
source§impl Clone for BufferSnapshot
impl Clone for BufferSnapshot
source§fn clone(&self) -> BufferSnapshot
fn clone(&self) -> BufferSnapshot
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for BufferSnapshot
impl Send for BufferSnapshot
impl Sync for BufferSnapshot
impl Unpin for BufferSnapshot
impl UnwindSafe for BufferSnapshot
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