Skip to main content

GroupsStore

Trait GroupsStore 

Source
pub trait GroupsStore<ID, S> {
    type Error: Error;

    // Required methods
    fn set_groups_state(
        &self,
        id: &ID,
        state: &S,
    ) -> impl Future<Output = Result<(), Self::Error>>;
    fn get_groups_state(
        &self,
        id: &ID,
    ) -> impl Future<Output = Result<Option<S>, Self::Error>>;
}
Expand description

Trait describing API for setting and getting groups CRDT state by id.

Required Associated Types§

Required Methods§

Source

fn set_groups_state( &self, id: &ID, state: &S, ) -> impl Future<Output = Result<(), Self::Error>>

Set state for a specified groups instance.

Source

fn get_groups_state( &self, id: &ID, ) -> impl Future<Output = Result<Option<S>, Self::Error>>

Get state for a specified groups instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<ID, S> GroupsStore<ID, S> for SqliteStore
where ID: for<'a> Deserialize<'a> + Serialize, S: for<'a> Deserialize<'a> + Serialize,

Available on crate feature sqlite only.