fn map_by_name(
    name: &str,
    original_type: Type,
    context: TypeContext,
) -> Rc<TypeHandler> {

    match name {

        "ComItf" => Rc::new( ComItfParam { ty: original_type, context } ),
        "CString" | "CStr" | "BString" | "BStr" | "String" | "str" =>
            Rc::new( StringParam { ty: original_type, context } ),
        "bool" =>
            Rc::new( BoolParam { context } ),
        "Variant" =>
            Rc::new( VariantParam { ty: original_type } ),
        // "str" => Rc::new( StringRefParam( original_type ) ),

        // Unknown. Use IdentityParam.
        _ => Rc::new( IdentityParam( original_type ) )
    }

}
/// Selects type handler based on the name of the type.
Selects type handler based on the name of the type.
Selects type handler based on the name of the type .
fn map_by_name(
    name: &str,
    original_type: Type,
    context: TypeContext,
) -> Rc<TypeHandler> {
    match name {
        "ComItf" => Rc::new( ComItfParam { ty: original_type, context } ),
        "CString" | "CStr" | "BString" | "BStr" | "String" | "str" =>
            Rc::new( StringParam { ty: original_type, context } ),
        "bool" =>
            Rc::new( BoolParam { context } ),
        "Variant" =>
            Rc::new( VariantParam { ty: original_type } ),
        // "str" => Rc::new( StringRefParam( original_type ) ),
        // Unknown. Use IdentityParam.
        _ => Rc::new( IdentityParam( original_type ) )
    }
}
fn map_by_name ( name : & str , original_type : Type , context : TypeContext , ) -> Rc < TypeHandler > { match name { " " => Rc :: new ( ComItfParam { ty : original_type , context } ) , " " | " " | " " | " " | " " | " " => Rc :: new ( StringParam { ty : original_type , context } ) , " " => Rc :: new ( BoolParam { context } ) , " " => Rc :: new ( VariantParam { ty : original_type } ) , // "str" => Rc::new( StringRefParam( original_type ) ), // Unknown. Use IdentityParam. _ => Rc :: new ( IdentityParam ( original_type ) ) } }
Selects type handler based on the name of the type.
Selects type handler based on the name of the type .
name
&str
original_type
Type
context
TypeContext