Trait ToAnnotation

Source
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§

Source

fn get_annotations( &self, interval: Interval, view: &View, text: &Rope, ) -> AnnotationSlice

Returns annotations that overlap the provided interval.

Implementors§

Source§

impl ToAnnotation for Find

Implementing the ToAnnotation trait allows to convert finds to annotations.

Source§

impl ToAnnotation for Selection

Implementing the ToAnnotation trait allows to convert selections to annotations.