ModelValue
The ModelValue trait defines a set of methods that must be implemented by any model value type
V.
Fully qualified path: dojo::model::model_value::ModelValue
pub trait ModelValue<V>
Trait functions
serialized_values
Returns a span of values associated with the entity, every field of a model that is not a key.
Fully qualified path: dojo::model::model_value::ModelValue::serialized_values
fn serialized_values(self: @V) -> Span<felt252>
from_serialized
Constructs a model value from its identifier and values.
Fully qualified path: dojo::model::model_value::ModelValue::from_serialized
fn from_serialized(values: Span<felt252>) -> Option<V>
name
Returns the name of the model value type.
Fully qualified path: dojo::model::model_value::ModelValue::name
fn name() -> ByteArray
layout
Returns the layout of the model value type.
Fully qualified path: dojo::model::model_value::ModelValue::layout
fn layout() -> Layout
instance_layout
Returns the layout of the model value.
Fully qualified path: dojo::model::model_value::ModelValue::instance_layout
fn instance_layout(self: @V) -> Layout
selector
Returns the selector of the model value type with the given namespace hash.
Fully qualified path: dojo::model::model_value::ModelValue::selector
fn selector(namespace_hash: felt252) -> felt252