fn generate_elem_binding(
        &mut self,
        idx: usize,
        elem_idx: u32,
        binding: &Binding,
        bindings: &NonstandardWebidlSection,
    ) -> Result<(), Error> {
        let webidl = bindings
            .types
            .get::<ast::WebidlFunction>(binding.webidl_ty)
            .unwrap();
        self.export_function_table()?;
        let mut builder = binding::Builder::new(self);
        let js = builder.process(&binding, &webidl, true, &None, &mut |_, _, args| {
            Ok(format!(
                "wasm.__wbg_function_table.get({})({})",
                elem_idx,
                args.join(", ")
            ))
        })?;
        self.globals
            .push_str(&format!("function __wbg_elem_binding{}{}\n", idx, js));
        Ok(())
    }
/// Generates a wrapper function for each bound element of the function
/// table. These wrapper functions have the expected WebIDL signature we'd
/// like them to have. This currently isn't part of the WebIDL bindings
/// proposal, but the thinking is that it'd look something like this if
/// added.
///
/// Note that this is just an internal function shim used by closures and
/// such, so we're not actually exporting anything here.
Generates a wrapper function for each bound element of the function
table. These wrapper functions have the expected WebIDL signature we'd
like them to have. This currently isn't part of the WebIDL bindings
proposal, but the thinking is that it'd look something like this if
added.

Note that this is just an internal function shim used by closures and
such, so we're not actually exporting anything here.
Generates a wrapper function for each bound element of the function table . These wrapper functions have the expected WebIDL signature we ' d like them to have . This currently isn ' t part of the WebIDL bindings proposal but the thinking is that it ' d look something like this if added . Note that this is just an internal function shim used by closures and such so we ' re not actually exporting anything here .
fn generate_elem_binding(
        &mut self,
        idx: usize,
        elem_idx: u32,
        binding: &Binding,
        bindings: &NonstandardWebidlSection,
    ) -> Result<(), Error> {
        let webidl = bindings
            .types
            .get::<ast::WebidlFunction>(binding.webidl_ty)
            .unwrap();
        self.export_function_table()?;
        let mut builder = binding::Builder::new(self);
        let js = builder.process(&binding, &webidl, true, &None, &mut |_, _, args| {
            Ok(format!(
                "wasm.__wbg_function_table.get({})({})",
                elem_idx,
                args.join(", ")
            ))
        })?;
        self.globals
            .push_str(&format!("function __wbg_elem_binding{}{}\n", idx, js));
        Ok(())
    }
fn generate_elem_binding ( & mut self , idx : usize , elem_idx : u32 , binding : & Binding , bindings : & NonstandardWebidlSection , ) -> Result < ( ) , Error > { let webidl = bindings . types . get :: < ast :: WebidlFunction > ( binding . webidl_ty ) . unwrap ( ) ; self . export_function_table ( ) ? ; let mut builder = binding :: Builder :: new ( self ) ; let js = builder . process ( & binding , & webidl , true , & None , & mut | _ , _ , args | { Ok ( format ! ( " " elem_idx args join ( " " ) ) ) } ) ? ; self . globals . push_str ( & format ! ( " \n " idx js ) ) ; Ok ( ( ) ) }
Generates a wrapper function for each bound element of the function
table.
Generates a wrapper function for each bound element of the function table .
&mut self
idx
usize
elem_idx
u32
binding
&Binding
bindings
&NonstandardWebidlSection
&mut self
idx
usize
elem_idx
u32
binding
&Binding
bindings
&NonstandardWebidlSection