pub trait BindingGenerator: Sized {
    type Config: BindingGeneratorConfig;

    fn write_bindings(
        ci: ComponentInterface,
        config: Self::Config,
        out_dir: &Utf8Path
    ) -> Result<()>; }
Expand description

A trait representing a UniFFI Binding Generator

External crates that implement binding generators, should implement this type and call the generate_external_bindings using a type that implements this trait.

Required Associated Types

Associated type representing a the bindings-specifig configuration parsed from the uniffi.toml

Required Methods

Writes the bindings to the output directory

  • ci: A ComponentInterface representing the interface
  • config: A instance of the BindingGeneratorConfig associated with this type
  • out_dir: The path to where the binding generator should write the output bindings