Trait GeneratorVisitor

Source
pub trait GeneratorVisitor<'tu>: Sized {
    // Provided methods
    fn wants_file(&mut self, path: &Path) -> bool { ... }
    fn visit_module_comment(&mut self, comment: String) { ... }
    fn visit_const(&mut self, cnst: Const<'tu>) { ... }
    fn visit_enum(&mut self, enm: Enum<'tu>) { ... }
    fn visit_func(&mut self, func: Func<'tu, '_>) { ... }
    fn visit_typedef(&mut self, typedef: Typedef<'tu, '_>) { ... }
    fn visit_class(&mut self, class: Class<'tu, '_>) { ... }
    fn visit_generated_type(&mut self, typ: GeneratedType<'tu, '_>) { ... }
    fn goodbye(self) { ... }
}
Expand description

Visitor of the different supported OpenCV entities, used in conjunction with Generator

Provided Methods§

Source

fn wants_file(&mut self, path: &Path) -> bool

Check whether the visitor is interested in entities from the specified file

Source

fn visit_module_comment(&mut self, comment: String)

Top-level module comment

Source

fn visit_const(&mut self, cnst: Const<'tu>)

Top-level constant

Source

fn visit_enum(&mut self, enm: Enum<'tu>)

Top-level enum

Source

fn visit_func(&mut self, func: Func<'tu, '_>)

Top-level function

Source

fn visit_typedef(&mut self, typedef: Typedef<'tu, '_>)

Top-level type alias

Source

fn visit_class(&mut self, class: Class<'tu, '_>)

Top-level class or an internal class of another class

Source

fn visit_generated_type(&mut self, typ: GeneratedType<'tu, '_>)

Dependent generated type like std::vector<Mat> or std::tuple<1, 2, 3>

Source

fn goodbye(self)

Called at the end of the visitation

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.

Implementors§