fn serialize_position(&self) -> Owned<SchemaComponentData> {
        let mut position_schema = SchemaComponentData::new();
        let position_fields = position_schema.fields_mut();

        let coords_obj = position_fields.add_object(1);
        coords_obj.add::<SchemaDouble>(1, &self.position.0.into());
        coords_obj.add::<SchemaDouble>(2, &self.position.1.into());
        coords_obj.add::<SchemaDouble>(3, &self.position.2.into());

        position_schema
    }
// A workaround for not having access to generated code types here. The shape of Position
// & EntityAcl are well known, so we can manually serialize them and pass them into the
// Entity in SchemaComponentData form.
//
// This does then expect that there is a valid deserialize method defined for both components
// in the vtable.
//
// If this invariant is broken, then the EntityBuilder is broken. Should we assert against this
// before we call `entity.add_serialized`?
A workaround for not having access to generated code types here. The shape of Position
& EntityAcl are well known, so we can manually serialize them and pass them into the
Entity in SchemaComponentData form.

This does then expect that there is a valid deserialize method defined for both components
in the vtable.

If this invariant is broken, then the EntityBuilder is broken.
A workaround for not having access to generated code types here . The shape of Position & EntityAcl are well known so we can manually serialize them and pass them into the Entity in SchemaComponentData form . This does then expect that there is a valid deserialize method defined for both components in the vtable . If this invariant is broken then the EntityBuilder is broken .
fn serialize_position(&self) -> Owned<SchemaComponentData> {
        let mut position_schema = SchemaComponentData::new();
        let position_fields = position_schema.fields_mut();
        let coords_obj = position_fields.add_object(1);
        coords_obj.add::<SchemaDouble>(1, &self.position.0.into());
        coords_obj.add::<SchemaDouble>(2, &self.position.1.into());
        coords_obj.add::<SchemaDouble>(3, &self.position.2.into());
        position_schema
    }
fn serialize_position ( & self ) -> Owned < SchemaComponentData > { let mut position_schema = SchemaComponentData :: new ( ) ; let position_fields = position_schema . fields_mut ( ) ; let coords_obj = position_fields . add_object ( 1 ) ; coords_obj . add :: < SchemaDouble > ( 1 , & self . position . 0 . into ( ) ) ; coords_obj . add :: < SchemaDouble > ( 2 , & self . position . 1 . into ( ) ) ; coords_obj . add :: < SchemaDouble > ( 3 , & self . position . 2 . into ( ) ) ; position_schema }
A workaround for not having access to generated code types here.
A workaround for not having access to generated code types here .
&self
&self