pub struct TeaRuntime<S, M> {
pub bus: Bus<M>,
pub env: Environment,
/* private fields */
}Expand description
Live runtime with channel-delivered model — true Elm Architecture.
S is owned exclusively by the reducer thread. After each update, the runtime
pushes Arc<S> to subscribers. Readers never lock shared state.
Fields§
§bus: Bus<M>§env: EnvironmentImplementations§
Source§impl<S, M> TeaRuntime<S, M>
impl<S, M> TeaRuntime<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 tea_store(&self) -> TeaStore<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§
Source§impl<S, M> Drop for TeaRuntime<S, M>
impl<S, M> Drop for TeaRuntime<S, M>
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for TeaRuntime<S, M>
impl<S, M> !UnwindSafe for TeaRuntime<S, M>
impl<S, M> Freeze for TeaRuntime<S, M>
impl<S, M> Send for TeaRuntime<S, M>
impl<S, M> Sync for TeaRuntime<S, M>
impl<S, M> Unpin for TeaRuntime<S, M>where
M: Unpin,
impl<S, M> UnsafeUnpin for TeaRuntime<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