Skip to main content

Callback

Trait Callback 

Source
pub trait Callback<'a> {
    // Required method
    fn on_match(&mut self, matched: &str) -> bool;

    // Provided methods
    fn on_finish(&mut self) -> bool { ... }
    fn push_index(&mut self) { ... }
    fn bump_index(&mut self) { ... }
    fn pop_index(&mut self) { ... }
    fn push_key(&mut self) { ... }
    fn set_key(&mut self, _key: Cow<'a, str>) { ... }
    fn pop_key(&mut self) { ... }
}

Required Methods§

Source

fn on_match(&mut self, matched: &str) -> bool

Provided Methods§

Source

fn on_finish(&mut self) -> bool

Source

fn push_index(&mut self)

Source

fn bump_index(&mut self)

Source

fn pop_index(&mut self)

Source

fn push_key(&mut self)

Source

fn set_key(&mut self, _key: Cow<'a, str>)

Source

fn pop_key(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, C1: Callback<'a>, C2: Callback<'a>> Callback<'a> for (C1, C2)

Source§

fn on_match(&mut self, matched: &str) -> bool

Source§

fn on_finish(&mut self) -> bool

Source§

fn push_index(&mut self)

Source§

fn bump_index(&mut self)

Source§

fn pop_index(&mut self)

Source§

fn push_key(&mut self)

Source§

fn set_key(&mut self, key: Cow<'a, str>)

Source§

fn pop_key(&mut self)

Implementors§

Source§

impl<'a, C: PathCallback<'a>> Callback<'a> for C