(&self)
| 254 | /// Adds serialization and deserialization support of SystemState to stable memory. |
| 255 | impl Storable for SystemState { |
| 256 | fn to_bytes(&self) -> Cow<[u8]> { |
| 257 | match &self { |
| 258 | SystemState::Uninitialized => Cow::Borrowed(&[]), |
| 259 | SystemState::Initialized(info) => info.to_bytes(), |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | fn from_bytes(bytes: Cow<[u8]>) -> Self { |
| 264 | if bytes.is_empty() { |
no outgoing calls