Serde
trait defines two core operations:
serialize
: Converts a value into a sequence of felt252
sdeserialize
: Reconstructs a value from a sequence of felt252
sfelt252
:
felt252
values:
Serde
Derive
Macro#[derive(Serde)]
attribute to automatically generate the
implementation for your type:
Serde
yourself:
felt252
s.
felt252
s.
If the value cannot be deserialized, returns None
.