fn to_typename(namespace: &Namespace, ty: &Type) -> String {
    match ty {
        Type::Ident(ident) => {
            let mut path = String::new();
            for name in namespace {
                path += &name.to_string();
                path += "::";
            }
            path += &ident.to_string();
            path
        }
        Type::CxxVector(ptr) => format!("::std::vector<{}>", to_typename(namespace, &ptr.inner)),
        _ => unreachable!(),
    }
}
// Only called for legal referent types of unique_ptr and element types of
// std::vector and Vec.
Only called for legal referent types of unique_ptr and element types of
std::vector and Vec.
Only called for legal referent types of unique_ptr and element types of std :: vector and Vec .
fn to_typename(namespace: &Namespace, ty: &Type) -> String {
    match ty {
        Type::Ident(ident) => {
            let mut path = String::new();
            for name in namespace {
                path += &name.to_string();
                path += "::";
            }
            path += &ident.to_string();
            path
        }
        Type::CxxVector(ptr) => format!("::std::vector<{}>", to_typename(namespace, &ptr.inner)),
        _ => unreachable!(),
    }
}
fn to_typename ( namespace : & Namespace , ty : & Type ) -> String { match ty { Type :: Ident ( ident ) => { let mut path = String :: new ( ) ; for name in namespace { path += & name . to_string ( ) ; path += " " ; } path += & ident . to_string ( ) ; path } Type :: CxxVector ( ptr ) => format ! ( " " to_typename ( namespace ptr inner ) ) , _ => unreachable ! ( ) , } }
Only called for legal referent types of unique_ptr and element types of
std::vector and Vec.
Only called for legal referent types of unique_ptr and element types of std :: vector and Vec .
namespace
&Namespace
ty
&Type
namespace
&Namespace
ty
&Type