clay_core/store.rs
1use crate::{Push, Context};
2
3
4/// Something that could store its data on a device.
5pub trait Store {
6 /// The data that is stored on the device.
7 type Data: Push;
8
9 /// Creates device data.
10 fn create_data(&self, context: &Context) -> crate::Result<Self::Data>;
11
12 /// Updates device data.
13 fn update_data(&self, context: &Context, data: &mut Self::Data) -> crate::Result<()>;
14}