Struct warp_contracts_core::optional_cell::OptionalCell
source · pub struct OptionalCell<T> {
pub cell: RefCell<Option<T>>,
}Expand description
Tiny wrapper over RefCell that:
- allow for uninitialized values (by storing Option)
- allow static usage (by implementing Sync and providing const constructor)
Because WASM is single threaded, we don’t need to worry much about inter-thread communication
Fields§
§cell: RefCell<Option<T>>