pub fn as_arg_token(&self, ctx: &FunctionContext) -> TokenStream {
        let arg_len = self.rust_args_len();
        let count_literal = arg_len.to_string();
        let js_count = LitInt::new(&count_literal, Span::call_site());

        let rust_args: Vec<TokenStream> = self
            .args
            .iter()
            .filter(|arg| !arg.is_callback())
            .enumerate()
            .map(|(i, arg)| arg.js_to_rust_token_stream(i, ctx))
            .collect();

        quote! {

            let js_cb = js_env.get_cb_info(cb_info, #js_count)?;
            #(#rust_args)*

        }
    }
/// generate code to extract cb based on method signature
/// first it extract cb info based on argument count
/// then it generates rust variables based on arguments conversion.
generate code to extract cb based on method signature
first it extract cb info based on argument count
then it generates rust variables based on arguments conversion.
generate code to extract cb based on method signature first it extract cb info based on argument count then it generates rust variables based on arguments conversion .
pub fn as_arg_token(&self, ctx: &FunctionContext) -> TokenStream {
        let arg_len = self.rust_args_len();
        let count_literal = arg_len.to_string();
        let js_count = LitInt::new(&count_literal, Span::call_site());
        let rust_args: Vec<TokenStream> = self
            .args
            .iter()
            .filter(|arg| !arg.is_callback())
            .enumerate()
            .map(|(i, arg)| arg.js_to_rust_token_stream(i, ctx))
            .collect();
        quote! {
            let js_cb = js_env.get_cb_info(cb_info, #js_count)?;
            #(#rust_args)*
        }
    }
pub fn as_arg_token ( & self , ctx : & FunctionContext ) -> TokenStream { let arg_len = self . rust_args_len ( ) ; let count_literal = arg_len . to_string ( ) ; let js_count = LitInt :: new ( & count_literal , Span :: call_site ( ) ) ; let rust_args : Vec < TokenStream > = self . args . iter ( ) . filter ( | arg | ! arg . is_callback ( ) ) . enumerate ( ) . map ( | ( i , arg ) | arg . js_to_rust_token_stream ( i , ctx ) ) . collect ( ) ; quote ! { let js_cb js_env get_cb_info ( cb_info js_count ) ( rust_args ) } }
generate code to extract cb based on method signature
first it extract cb info based on argument count
then it generates rust variables based on arguments conversion.
generate code to extract cb based on method signature first it extract cb info based on argument count then it generates rust variables based on arguments conversion .
&self
ctx
&FunctionContext