fn rust_type_for(field_name: &str, field_spec: &Spec) -> String {
            match field_spec {
                Spec::Value(primitive) => primitive.rust_type(),
                Spec::Array(inner) => format!("Vec<{}>", rust_type_for(field_name, &*inner)),
                Spec::Struct(_) => field_name.to_camel_case(),
            }
        }
/// Returns Rust type (as a String) for a given struct field
Returns Rust type (as a String) for a given struct field
Returns Rust type ( as a String ) for a given struct field
fn rust_type_for(field_name: &str, field_spec: &Spec) -> String {
            match field_spec {
                Spec::Value(primitive) => primitive.rust_type(),
                Spec::Array(inner) => format!("Vec<{}>", rust_type_for(field_name, &*inner)),
                Spec::Struct(_) => field_name.to_camel_case(),
            }
        }
fn rust_type_for ( field_name : & str , field_spec : & Spec ) -> String { match field_spec { Spec :: Value ( primitive ) => primitive . rust_type ( ) , Spec :: Array ( inner ) => format ! ( " " rust_type_for ( field_name inner ) ) , Spec :: Struct ( _ ) => field_name . to_camel_case ( ) , } }
Returns Rust type (as a String) for a given struct field
Returns Rust type ( as a String ) for a given struct field
field_name
&str
field_spec
&Spec