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