pub trait ToAnnotation {
// Required method
fn get_annotations(
&self,
interval: Interval,
view: &View,
text: &Rope,
) -> AnnotationSlice;
}
Expand description
A trait for types (like Selection
) that have a distinct representation
in core but are presented to the frontend as annotations.
Required Methods§
Sourcefn get_annotations(
&self,
interval: Interval,
view: &View,
text: &Rope,
) -> AnnotationSlice
fn get_annotations( &self, interval: Interval, view: &View, text: &Rope, ) -> AnnotationSlice
Returns annotations that overlap the provided interval.
Implementors§
impl ToAnnotation for Find
Implementing the ToAnnotation
trait allows to convert finds to annotations.
impl ToAnnotation for Selection
Implementing the ToAnnotation
trait allows to convert selections to annotations.