pub struct Runtime<S, M> {
pub state: Arc<Mutex<S>>,
pub bus: Bus<M>,
pub env: Environment,
/* private fields */
}Expand description
Live runtime — bus-driven update loop on a pinned thread with Tokio effect interpreter.
Fields§
§state: Arc<Mutex<S>>§bus: Bus<M>§env: EnvironmentImplementations§
Source§impl<S, M> Runtime<S, M>
impl<S, M> Runtime<S, M>
pub fn from_program( program: Program<S, M>, env: Environment, config: RuntimeConfig, ) -> Result<Self, RuntimeError>
pub fn from_reducer_program<R>( program: ReducerProgram<R>, env: Environment, config: RuntimeConfig, ) -> Result<Self, RuntimeError>
pub fn store(&self) -> Store<S, M>
pub fn dispatch(&self, msg: M)
pub fn sender(&self) -> BusSender<M>
pub fn cancel(&self, id: EffectId)
pub fn shutdown(self)
Trait Implementations§
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for Runtime<S, M>
impl<S, M> !UnwindSafe for Runtime<S, M>
impl<S, M> Freeze for Runtime<S, M>
impl<S, M> Send for Runtime<S, M>
impl<S, M> Sync for Runtime<S, M>
impl<S, M> Unpin for Runtime<S, M>where
M: Unpin,
impl<S, M> UnsafeUnpin for Runtime<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