Struct text2::BufferSnapshot
source · pub struct BufferSnapshot {
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) -> ReplicaId
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: ToOffset>( &self, range: Range<T> ) -> impl Iterator<Item = char> + '_
pub fn reversed_chars_for_range<T: ToOffset>( &self, range: Range<T> ) -> impl Iterator<Item = char> + '_
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: ToOffset>( &self, position: T ) -> impl Iterator<Item = char> + '_
pub fn reversed_chars_at<T: ToOffset>( &self, position: T ) -> impl Iterator<Item = char> + '_
pub fn reversed_chunks_in_range<T: ToOffset>( &self, range: Range<T> ) -> Chunks<'_> ⓘ
pub fn bytes_in_range<T: ToOffset>(&self, range: Range<T>) -> Bytes<'_> ⓘ
pub fn reversed_bytes_in_range<T: ToOffset>(&self, range: Range<T>) -> Bytes<'_> ⓘ
pub fn text_for_range<T: ToOffset>(&self, range: Range<T>) -> Chunks<'_> ⓘ
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: ToOffset>(&self, range: Range<O>) -> Dwhere D: TextDimension,
pub fn summaries_for_anchors<'a, D, A>( &'a self, anchors: A ) -> impl 'a + Iterator<Item = D>where 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 'a + Iterator<Item = (D, T)>where D: 'a + TextDimension, A: 'a + IntoIterator<Item = (&'a Anchor, T)>,
pub fn anchor_before<T: ToOffset>(&self, position: T) -> Anchor
pub fn anchor_after<T: ToOffset>(&self, position: T) -> Anchor
pub fn anchor_at<T: ToOffset>(&self, position: T, bias: Bias) -> Anchor
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<'a, D>( &'a self, since: &'a Global ) -> impl 'a + Iterator<Item = Edit<D>>where D: TextDimension + Ord,
pub fn anchored_edits_since<'a, D>( &'a self, since: &'a Global ) -> impl 'a + Iterator<Item = (Edit<D>, Range<Anchor>)>where D: TextDimension + Ord,
pub fn edits_since_in_range<'a, D>( &'a self, since: &'a Global, range: Range<Anchor> ) -> impl 'a + Iterator<Item = Edit<D>>where D: TextDimension + Ord,
pub fn anchored_edits_since_in_range<'a, D>( &'a self, since: &'a Global, range: Range<Anchor> ) -> impl 'a + Iterator<Item = (Edit<D>, Range<Anchor>)>where 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