pub trait BindingsConfig: DeserializeOwned {
    // Required methods
    fn update_from_ci(&mut self, ci: &ComponentInterface);
    fn update_from_cdylib_name(&mut self, cdylib_name: &str);
    fn update_from_dependency_configs(
        &mut self,
        config_map: HashMap<&str, &Self>
    );
}
Expand description

Trait for bindings configuration. Each bindings language defines one of these.

BindingsConfigs are initially loaded from uniffi.toml file. Then the trait methods are used to fill in missing values.

Required Methods§

source

fn update_from_ci(&mut self, ci: &ComponentInterface)

Update missing values using the ComponentInterface

source

fn update_from_cdylib_name(&mut self, cdylib_name: &str)

Update missing values using the dylib file for the main crate, when in library mode.

cdylib_name will be the library filename without the leading lib and trailing extension

source

fn update_from_dependency_configs(&mut self, config_map: HashMap<&str, &Self>)

Update missing values from config instances from dependent crates

config_map maps crate names to config instances. This is mostly used to set up external types.

Implementors§

source§

impl BindingsConfig for uniffi_bindgen::bindings::kotlin::gen_kotlin::Config

source§

impl BindingsConfig for uniffi_bindgen::bindings::python::gen_python::Config

source§

impl BindingsConfig for uniffi_bindgen::bindings::ruby::gen_ruby::Config

source§

impl BindingsConfig for uniffi_bindgen::bindings::swift::gen_swift::Config

source§

impl BindingsConfig for uniffi_bindgen::Config

source§

impl BindingsConfig for EmptyBindingsConfig