You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: datamodel_ast_builder.rs
    path of file: ./repos/prisma-engines/query-engine/dmmf/src/ast_builders
    
    the code of the file until where you have to start completion: use crate::serialization_ast::datamodel_ast::{
    Datamodel, Enum, EnumValue, Field, Function, Model, PrimaryKey, UniqueIndex,
};
use bigdecimal::ToPrimitive;
use psl::{
    parser_database::{walkers, ScalarFieldType},
    schema_ast::ast::WithDocumentation,
};
use query_structure::{dml_default_kind, encode_bytes, DefaultKind, FieldArity, PrismaValue};

pub(crate) fn schema_to_dmmf(schema: &psl::ValidatedSchema) -> Datamodel {
    let mut datamodel = Datamodel {
        models: Vec::with_capacity(schema.db.models_count()),
        enums: Vec::with_capacity(schema.db.enums_count()),
        types: Vec::new(),
    };

    for enum_model in schema.db.walk_enums() {
        datamodel.enums.push(enum_to_dmmf(enum_model));
    
pub(crate) fn schema_to_dmmf(schema: &psl::ValidatedSchema) -> Datamodel {
    let mut datamodel = Datamodel {
        models: Vec::with_capacity(schema.db.models_count()),
        enums: Vec::with_capacity(schema.db.enums_count()),
        types: Vec::new(),
    };

    for enum_model in schema.db.walk_enums() {
        datamodel.enums.push(enum_to_dmmf(enum_model));
    }

    for model in schema
        .db
        .walk_models()
        .filter(|model| !model.is_ignored())
        .chain(schema.db.walk_views().filter(|view| !view.is_ignored()))
    {
        datamodel.models.push(model_to_dmmf(model));
    }

    for ct in schema.db.walk_composite_types() {
        datamodel.types.push(composite_type_to_dmmf(ct))
    }

    datamodel
}