def generate_metric_type()

in glean_parser/rust_server.py [0:0]


def generate_metric_type(metric_type: str) -> str:
    """Return string representation of metric type in Rust."""
    if metric_type == "quantity":
        return "u64"
    elif metric_type == "string":
        return "String"
    elif metric_type == "boolean":
        return "bool"
    elif metric_type == "datetime":
        return "chrono::DateTime<Utc>"
    else:
        print(f"❌ Unable to generate Rust type from metric type: {metric_type}")
        exit()
        return "NONE"