Storage
-
Storing User Data with Rust Structs and Enums
In Soroban we model contract state with Rust types. For example, the SoroMarket contract defines a Rust struct for each user’s bets and an enum for the market outcome. Here is a simplified version of the code: Here Outcome holds the global state of the contract as a single enum variable and Bets is a…