Skip to main content

SRc

Type Alias SRc 

Source
pub type SRc<Storage, T> = SharedState<Rc<<Storage as SharedStorageView>::Storage<T>>, Storage, T>;
Expand description

Shared state backed by Rc<Storage::Storage<T>>.

Use this alias when you want single-threaded aliasing but want to choose the synchronization cell yourself. The first type parameter is the SharedStorage backend, not the actual Rc payload:

use magicstatemachines::{RefCellStorage, SRc};

let shared: SRc<RefCellStorage, Connection> =
    SRc::new::<Disconnected>(Connection::new("localhost:8080"));

Most code should use SRcRefCell unless it is intentionally exercising a custom backend.

Aliased Type§

pub struct SRc<Storage, T> { /* private fields */ }