pub fn new(
        interface: &'a Interface,
        types: &'a mut ComponentTypeSection,
        exports: &'a mut ComponentExportSection,
        type_map: &'a mut HashMap<TypeDefKey<'a>, u32>,
        func_type_map: &'a mut HashMap<FunctionKey<'a>, u32>,
        exported: &'a mut HashMap<&'a str, u32>,
    ) -> Result<Self> {
        if interface.resources.len() != 0 {
            bail!("the use of resources in interfaces is not currently not supported");
        }

        Ok(InterfaceEncoder {
            interface,
            types,
            exports,
            type_map,
            func_type_map,
            exported,
        })
    }
/// Creates a new `InterfaceEncoder` for the given interface.
///
/// The interface will be encoded in the given sections.
Creates a new `InterfaceEncoder` for the given interface.
The interface will be encoded in the given sections.
Creates a new ` InterfaceEncoder ` for the given interface . The interface will be encoded in the given sections .
pub fn new(
        interface: &'a Interface,
        types: &'a mut ComponentTypeSection,
        exports: &'a mut ComponentExportSection,
        type_map: &'a mut HashMap<TypeDefKey<'a>, u32>,
        func_type_map: &'a mut HashMap<FunctionKey<'a>, u32>,
        exported: &'a mut HashMap<&'a str, u32>,
    ) -> Result<Self> {
        if interface.resources.len() != 0 {
            bail!("the use of resources in interfaces is not currently not supported");
        }
        Ok(InterfaceEncoder {
            interface,
            types,
            exports,
            type_map,
            func_type_map,
            exported,
        })
    }
pub fn new ( interface : & ' a Interface , types : & ' a mut ComponentTypeSection , exports : & ' a mut ComponentExportSection , type_map : & ' a mut HashMap < TypeDefKey < ' a > , u32 > , func_type_map : & ' a mut HashMap < FunctionKey < ' a > , u32 > , exported : & ' a mut HashMap < & ' a str , u32 > , ) -> Result < Self > { if interface . resources . len ( ) != 0 { bail ! ( " " ) ; } Ok ( InterfaceEncoder { interface , types , exports , type_map , func_type_map , exported , } ) }
Creates a new `InterfaceEncoder` for the given interface.
Creates a new ` InterfaceEncoder ` for the given interface .
interface
&'a Interface
types
&'a mut ComponentTypeSection
exports
&'a mut ComponentExportSection
type_map
&'a mut HashMap<TypeDefKey<'a>, u32>
func_type_map
&'a mut HashMap<FunctionKey<'a>, u32>
exported
&'a mut HashMap<&'a str, u32>
interface
&'a Interface
types
&'a mut ComponentTypeSection
exports
&'a mut ComponentExportSection
type_map
&'a mut HashMap<TypeDefKey<'a>, u32>
func_type_map
&'a mut HashMap<FunctionKey<'a>, u32>
exported
&'a mut HashMap<&'a str, u32>