pub trait BindingGeneratorConfig: for<'de> Deserialize<'de> {
    fn get_entry_from_bindings_table(bindings: &Value) -> Option<Value>;
    fn get_config_defaults(ci: &ComponentInterface) -> Vec<(String, Value)>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; }
Expand description

A trait representing a Binding Generator Configuration

External crates that implement binding generators need to implement this trait and set it as the BindingGenerator.config associated type. generate_external_bindings() then uses it to generate the config that’s passed to BindingGenerator.write_bindings()

Required Methods


fn get_entry_from_bindings_table(bindings: &Value) -> Option<Value>

Get the entry for this config from the bindings table.

Get default config values from the ComponentInterface

These will replace missing entries in the bindings-specific config