pub trait GetObjectTypeOf<T> {
    // Required method
    fn get_object_type_of(&self, v: T) -> Result<ObjectType, ModelErr>;
}
Expand description

Trait for getting the object type.

§Examples

use dypdl::prelude::*;

let mut model = Model::default();
let object_type = model.add_object_type("object", 4).unwrap();
let variable = model.add_element_variable("variable", object_type, 0).unwrap();

assert!(model.get_object_type_of(variable).is_ok())

Required Methods§

source

fn get_object_type_of(&self, v: T) -> Result<ObjectType, ModelErr>

Returns the object type of the variable.

§Errors

If the variable is not included in the model.

Implementors§