pub struct RwRuntime<S, M> {
pub state: Arc<RwLock<S>>,
pub bus: Bus<M>,
pub env: Environment,
/* private fields */
}Expand description
Live runtime with RwLock state — many concurrent readers, exclusive writer on reducer thread.
Fields§
§state: Arc<RwLock<S>>§bus: Bus<M>§env: EnvironmentImplementations§
Source§impl<S, M> RwRuntime<S, M>
impl<S, M> RwRuntime<S, M>
pub fn from_program( program: Program<S, M>, env: Environment, config: RuntimeConfig, ) -> Self
pub fn from_reducer_program<R>( program: ReducerProgram<R>, env: Environment, config: RuntimeConfig, ) -> Self
pub fn rw_store(&self) -> RwStore<S, M>
pub fn dispatch(&self, msg: M)
pub fn sender(&self) -> BusSender<M>
pub fn cancel(&self, id: EffectId)
pub fn shutdown(self)
Auto Trait Implementations§
impl<S, M> !Freeze for RwRuntime<S, M>
impl<S, M> !RefUnwindSafe for RwRuntime<S, M>
impl<S, M> !UnwindSafe for RwRuntime<S, M>
impl<S, M> Send for RwRuntime<S, M>
impl<S, M> Sync for RwRuntime<S, M>
impl<S, M> Unpin for RwRuntime<S, M>where
M: Unpin,
impl<S, M> UnsafeUnpin for RwRuntime<S, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more