pub struct EffectRuntime<S, A: Action, E, St: EffectStoreLike<S, A, E> = EffectStore<S, A, E>> { /* private fields */ }Expand description
Runtime helper for effect-based stores.
Implementations§
Source§impl<S: 'static, A: Action, E> EffectRuntime<S, A, E, EffectStore<S, A, E>>
impl<S: 'static, A: Action, E> EffectRuntime<S, A, E, EffectStore<S, A, E>>
Sourcepub fn new(state: S, reducer: EffectReducer<S, A, E>) -> Self
pub fn new(state: S, reducer: EffectReducer<S, A, E>) -> Self
Create a runtime from state + effect reducer.
Source§impl<S: 'static, A: Action, E, St: EffectStoreLike<S, A, E>> EffectRuntime<S, A, E, St>
impl<S: 'static, A: Action, E, St: EffectStoreLike<S, A, E>> EffectRuntime<S, A, E, St>
Sourcepub fn from_store(store: St) -> Self
pub fn from_store(store: St) -> Self
Create a runtime from an existing effect store.
Sourcepub fn with_debug(self, debug: DebugLayer<A>) -> Selfwhere
S: DebugState,
A: ActionParams,
pub fn with_debug(self, debug: DebugLayer<A>) -> Selfwhere
S: DebugState,
A: ActionParams,
Attach a debug layer (auto-wires tasks/subscriptions when available).
Sourcepub fn with_event_poller(self, config: PollerConfig) -> Self
pub fn with_event_poller(self, config: PollerConfig) -> Self
Configure event polling behavior.
Sourcepub fn action_tx(&self) -> UnboundedSender<A>
pub fn action_tx(&self) -> UnboundedSender<A>
Clone the action sender.
Auto Trait Implementations§
impl<S, A, E, St> Freeze for EffectRuntime<S, A, E, St>where
St: Freeze,
impl<S, A, E, St = EffectStore<S, A, E>> !RefUnwindSafe for EffectRuntime<S, A, E, St>
impl<S, A, E, St = EffectStore<S, A, E>> !Send for EffectRuntime<S, A, E, St>
impl<S, A, E, St = EffectStore<S, A, E>> !Sync for EffectRuntime<S, A, E, St>
impl<S, A, E, St> Unpin for EffectRuntime<S, A, E, St>
impl<S, A, E, St = EffectStore<S, A, E>> !UnwindSafe for EffectRuntime<S, A, E, St>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more