Expand description

Allows controllers to store state in persistent device level storage.

Structs§

  • Stores device level settings in persistent storage. User level settings should not use this.

Traits§

  • Structs that can be stored in device storage should derive the Serialize, Deserialize, and Clone traits, as well as provide constants. KEY should be unique the struct, usually the name of the struct itself. DEFAULT_VALUE will be the value returned when nothing has yet been stored.
  • This trait represents types that can be converted into a storable type. It’s also important that the type it is transformed into can also be converted back into this type. This reverse conversion is used to populate the fields of the original type with the stored values plus defaulting the other fields that, e.g. might later be populated from hardware APIs.