Skip to main content

DeviceAware

Trait DeviceAware 

Source
pub trait DeviceAware {
    // Required methods
    fn device_id(&self) -> &DeviceId;
    fn set_device_id(&mut self, device_id: DeviceId);
}
Expand description

Trait for CRDTs that track device state

Required Methods§

Source

fn device_id(&self) -> &DeviceId

Gets the device ID associated with this CRDT

Source

fn set_device_id(&mut self, device_id: DeviceId)

Sets the device ID

Implementors§

Source§

impl DeviceAware for GCounter

Source§

impl DeviceAware for PnCounter

Source§

impl<T> DeviceAware for LwwRegister<T>
where T: Clone + Serialize + for<'de> Deserialize<'de>,

Source§

impl<T> DeviceAware for OrSet<T>
where T: Clone + Eq + Hash + Serialize + for<'de> Deserialize<'de>,