pub fn com_to_rust(
        &self,
        ident: &Ident,
        span: Span,
        dir: Direction,
        infallible: bool,
    ) -> TokenStream
    {
        // Construct bits for the quote.
        let ty = &self.ty;
        let ts = self.context.type_system.as_typesystem_type(span);
        let (tr, unwrap) = resolve_type_handling(dir, infallible, span);
        let (maybe_ref, maybe_as_ref) = resolve_ref(ty);
        match dir {
            Direction::In => quote_spanned!(span=>
                    #maybe_ref <#ty as #tr<#ts>>
                        ::from_foreign_parameter(#ident)#unwrap#maybe_as_ref),

            // Output variables do not use #unwrap to avoid jumping out before all parameters have
            // been converted from foreign output. This ensures all parameters are brought under
            // Rust's memory management.
            Direction::Out | Direction::Retval => quote_spanned!(span=>
                    <#ty as #tr<#ts>>::from_foreign_output(#ident)),
        }
    }
/// Converts a COM parameter named by the ident into a Rust type.
Converts a COM parameter named by the ident into a Rust type.
Converts a COM parameter named by the ident into a Rust type .
pub fn com_to_rust(
        &self,
        ident: &Ident,
        span: Span,
        dir: Direction,
        infallible: bool,
    ) -> TokenStream
    {
        // Construct bits for the quote.
        let ty = &self.ty;
        let ts = self.context.type_system.as_typesystem_type(span);
        let (tr, unwrap) = resolve_type_handling(dir, infallible, span);
        let (maybe_ref, maybe_as_ref) = resolve_ref(ty);
        match dir {
            Direction::In => quote_spanned!(span=>
                    #maybe_ref <#ty as #tr<#ts>>
                        ::from_foreign_parameter(#ident)#unwrap#maybe_as_ref),
            // Output variables do not use #unwrap to avoid jumping out before all parameters have
            // been converted from foreign output. This ensures all parameters are brought under
            // Rust's memory management.
            Direction::Out | Direction::Retval => quote_spanned!(span=>
                    <#ty as #tr<#ts>>::from_foreign_output(#ident)),
        }
    }
pub fn com_to_rust ( & self , ident : & Ident , span : Span , dir : Direction , infallible : bool , ) -> TokenStream { // Construct bits for the quote. let ty = & self . ty ; let ts = self . context . type_system . as_typesystem_type ( span ) ; let ( tr , unwrap ) = resolve_type_handling ( dir , infallible , span ) ; let ( maybe_ref , maybe_as_ref ) = resolve_ref ( ty ) ; match dir { Direction :: In => quote_spanned ! ( span maybe_ref ty as tr ts from_foreign_parameter ( ident ) unwrap maybe_as_ref ) , // Output variables do not use #unwrap to avoid jumping out before all parameters have // been converted from foreign output. This ensures all parameters are brought under // Rust's memory management. Direction :: Out | Direction :: Retval => quote_spanned ! ( span ty as tr ts from_foreign_output ( ident ) ) , } }
Converts a COM parameter named by the ident into a Rust type.
Converts a COM parameter named by the ident into a Rust type .
&self
ident
&Ident
span
Span
dir
Direction
infallible
bool
&self
ident
&Ident
span
Span
dir
Direction
infallible
bool