Skip to main content

SyncStateExt

Trait SyncStateExt 

Source
pub trait SyncStateExt<R: Runtime> {
    // Required methods
    fn sync_read<S: SyncState>(&self) -> Result<S>;
    fn sync_mutate<S: SyncState>(&self, f: impl FnOnce(&mut S)) -> Result<()>;
}

Required Methods§

Source

fn sync_read<S: SyncState>(&self) -> Result<S>

Source

fn sync_mutate<S: SyncState>(&self, f: impl FnOnce(&mut S)) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R: Runtime, T: Manager<R> + Emitter<R>> SyncStateExt<R> for T