Macro sbor::define_single_versioned
source · macro_rules! define_single_versioned { ( $(#[$attributes:meta])* $vis:vis enum $name:ident $(< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? $( = $deflt:tt)? ),+ >)? => $latest_version_alias:ty = $latest_version_type:ty ) => { ... }; }
Expand description
This macro is intended for creating a data model which supports versioning. This is useful for creating an SBOR data model which can be updated in future. In future, enum variants can be added, and automatically mapped to.
This macro is just a simpler wrapper around the crate::define_versioned
macro,
for use when there’s just a single version.