pub struct AnnotationStore { /* private fields */ }
Expand description
All the annotations for a given view
Implementations§
Source§impl AnnotationStore
impl AnnotationStore
pub fn new() -> Self
Sourcepub fn invalidate(&mut self, interval: Interval)
pub fn invalidate(&mut self, interval: Interval)
Invalidates and removes all annotations in the range of the interval.
Sourcepub fn update(
&mut self,
source: PluginId,
interval: Interval,
item: Annotations,
)
pub fn update( &mut self, source: PluginId, interval: Interval, item: Annotations, )
Applies an update from a plugin to a set of annotations
Sourcepub fn iter_range<'c>(
&'c self,
view: &'c View,
text: &'c Rope,
interval: Interval,
) -> impl Iterator<Item = AnnotationSlice> + 'c
pub fn iter_range<'c>( &'c self, view: &'c View, text: &'c Rope, interval: Interval, ) -> impl Iterator<Item = AnnotationSlice> + 'c
Returns an iterator which produces, for each type of annotation, those annotations which intersect the given interval.
Auto Trait Implementations§
impl Freeze for AnnotationStore
impl RefUnwindSafe for AnnotationStore
impl Send for AnnotationStore
impl Sync for AnnotationStore
impl Unpin for AnnotationStore
impl UnwindSafe for AnnotationStore
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