Skip to main content

create_control

Function create_control 

Source
pub fn create_control(
    tx: &mut Transaction,
    schema: &Schema,
    kind: ControlKind,
    global_id: &str,
    predefined_type: Option<&str>,
    draft: ControlDraft<'_>,
) -> ControlResult<EntityId>
Expand description

Stage one control record.

The arity is taken from schema, not hardcoded, so a schema that declares a different tail produces a correctly-sized record instead of a silently truncated one.

§Errors

Refuses a malformed GlobalId; a blank name; a token outside the entity’s own enum; USERDEFINED without object_type; a life_cycle_phase on an entity that does not declare it and a missing one on IfcPerformanceHistory; status or long_description on IfcPerformanceHistory; and an entity the schema does not declare.