pub struct ActionLoop { /* private fields */ }Expand description
Owned bounded Action → Effect application loop.
The reducer runs synchronously. Effects are polled concurrently through a bounded owned set, so no task is detached and shutdown is deterministic.
Implementations§
Source§impl ActionLoop
impl ActionLoop
Sourcepub fn new(
action_capacity: usize,
effect_capacity: usize,
) -> (ActionSender, Self)
pub fn new( action_capacity: usize, effect_capacity: usize, ) -> (ActionSender, Self)
Creates an application loop with explicit non-zero queue bounds.
§Panics
Panics when either capacity is zero.
Sourcepub async fn run(self, state: &mut TuiState, executor: &dyn EffectExecutor)
pub async fn run(self, state: &mut TuiState, executor: &dyn EffectExecutor)
Runs until every action sender is dropped and all accepted effects finish.
Effects are polled concurrently up to the configured bound and their completion actions are reduced in dispatch order. Action reception is backpressured while that bound is full, so terminal input remains bounded without dropping authoritative snapshot reloads.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActionLoop
impl RefUnwindSafe for ActionLoop
impl Send for ActionLoop
impl Sync for ActionLoop
impl Unpin for ActionLoop
impl UnsafeUnpin for ActionLoop
impl UnwindSafe for ActionLoop
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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