Trait uniffi_bindgen::BindingGenerator 
source · pub trait BindingGenerator: Sized {
    type Config: BindingsConfig;
    // Required methods
    fn write_bindings(
        &self,
        ci: &ComponentInterface,
        config: &Self::Config,
        out_dir: &Utf8Path,
        try_format_code: bool
    ) -> Result<()>;
    fn check_library_path(
        &self,
        library_path: &Utf8Path,
        cdylib_name: Option<&str>
    ) -> 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§
sourcetype Config: BindingsConfig
 
type Config: BindingsConfig
Handles configuring the bindings
Required Methods§
sourcefn write_bindings(
    &self,
    ci: &ComponentInterface,
    config: &Self::Config,
    out_dir: &Utf8Path,
    try_format_code: bool
) -> Result<()>
 
fn write_bindings( &self, ci: &ComponentInterface, config: &Self::Config, out_dir: &Utf8Path, try_format_code: bool ) -> Result<()>
Writes the bindings to the output directory
Arguments
ci: AComponentInterfacerepresenting the interfaceconfig: An instance of theBindingsConfigassociated with this typeout_dir: The path to where the binding generator should write the output bindings