Skip to main content

ZoneOracle

Trait ZoneOracle 

Source
pub trait ZoneOracle {
    // Required methods
    fn contains(&mut self, cursor: usize) -> bool;
    fn contains_code_link_or_frontmatter(&mut self, cursor: usize) -> bool;
}
Expand description

Lazily answers the two exclusion-zone queries the trigger veto needs. Consulted ONLY after a wikilink/hashtag opener is found in the local backward scan, so a keystroke with no trigger candidate never pays for the full-buffer ExclusionZones scan (pulldown + regex). Implementors decide whether to precompute, recompute, or memoize.

Required Methods§

Source

fn contains(&mut self, cursor: usize) -> bool

Mirror of ExclusionZones::contains — the hashtag veto.

Mirror of ExclusionZones::contains_code_link_or_frontmatter — the wikilink veto.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§