Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ModelValueParser

Trait ModelValueParser defines the interface for parsing and serializing entities of type V.

Fully qualified path: dojo::model::model_value::ModelValueParser

pub trait ModelValueParser<V>

Trait functions

deserialize

Deserializes the values of the model into a ModelValue struct.

Fully qualified path: dojo::model::model_value::ModelValueParser::deserialize

fn deserialize(ref values: Span<felt252>) -> Option<V>

serialize_values

Serializes the values of the model and returns them as a Span<felt252>.

Fully qualified path: dojo::model::model_value::ModelValueParser::serialize_values

fn serialize_values(self: @V) -> Span<felt252>