Trait Sections

Source
pub trait Sections {
    // Required methods
    fn sections_find<'a, F: SectionFinder>(
        &'a self,
        finder: F,
    ) -> SectionIter<'a, F> ;
    fn sections<'a, S, E>(
        &'a self,
        start: S,
        end: E,
    ) -> SectionIter<'a, SectionFnFinder<S, E>> 
       where S: Fn(&LineSpan<'_>) -> bool,
             E: Fn(&SectionSpan<'_>) -> bool;
}

Required Methods§

Source

fn sections_find<'a, F: SectionFinder>( &'a self, finder: F, ) -> SectionIter<'a, F>

Iterate over sections as found by an implementation of SectionFinder

Source

fn sections<'a, S, E>( &'a self, start: S, end: E, ) -> SectionIter<'a, SectionFnFinder<S, E>>
where S: Fn(&LineSpan<'_>) -> bool, E: Fn(&SectionSpan<'_>) -> bool,

Iterate over sections as found by an the provided closures

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Sections for str

Source§

fn sections_find<'a, F: SectionFinder>( &'a self, finder: F, ) -> SectionIter<'a, F>

Source§

fn sections<'a, S, E>( &'a self, start: S, end: E, ) -> SectionIter<'a, SectionFnFinder<S, E>>
where S: Fn(&LineSpan<'_>) -> bool, E: Fn(&SectionSpan<'_>) -> bool,

Implementors§