pub trait Generate {
    fn bindings(
        &mut self,
        _pkg: &Package,
        _config: &mut Config
    ) -> Result<(), Error>; fn array_type(
        &mut self,
        pkg: &Package,
        config: &mut Config,
        name: &str,
        ty: &ArrayType
    ) -> Result<(), Error>; fn opaque_type(
        &mut self,
        pkg: &Package,
        config: &mut Config,
        name: &str,
        ty: &OpaqueType
    ) -> Result<(), Error>; fn entry(
        &mut self,
        pkg: &Package,
        config: &mut Config,
        name: &str,
        entry: &Entry
    ) -> Result<(), Error>; fn generate(
        &mut self,
        pkg: &Package,
        config: &mut Config
    ) -> Result<(), Error> { ... } fn format(&mut self, _output: &Path) -> Result<(), Error> { ... } }

Required Methods

Step 1: generate any setup code or low-level bindings

Step 2: generate code for array types

Step 3: generate code for opaque types

Step 4: generate code for entry points

Provided Methods

Iterates through the manifest and generates code

Step 5: Optionally, run any formatting program or post-processing on the output file

Implementors