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: collections.rs
    path of file: ./repos/spatialos-sdk-rs/spatialos-sdk/src/schema
    
    the code of the file until where you have to start completion: use crate::schema::{
    Error, Field, FieldId, IndexedField, ObjectField, Res
    
    fn add(object: &mut SchemaObject, field: FieldId, map: &Self::RustType) {
        // Create a key-value pair object for each entry in the map.
        //
        // Map fields are represented in schema as a list of pairs of key and value. Each
        // entry in the map is an object field with field ID corresponding to the map's
        // field ID, and each object should have a key field with ID `SCHEMA_MAP_KEY_FIELD_ID`
        // and a value field with ID `SCHEMA_MAP_VALUE_FIELD_ID`.
        for (key, value) in map {
            let pair = object.add_object(field);
            pair.add::<K>(SCHEMA_MAP_KEY_FIELD_ID, key);
            pair.add::<V>(SCHEMA_MAP_VALUE_FIELD_ID, value);
        }
    }