pub struct ProcessBundleOptions<TCommand, TState, TEvent, TEffect> {
pub name: String,
pub initial_state: TState,
pub reduce: ProcessReducer<TCommand, TState, TEvent, TEffect>,
pub now: Rc<dyn Fn() -> u64>,
}Expand description
ProcessBundleOptions data container.
Fields§
§name: Stringname field for name.
initial_state: TStateinitial_state field for initial state.
reduce: ProcessReducer<TCommand, TState, TEvent, TEffect>reduce field for reduce.
now: Rc<dyn Fn() -> u64>now field for now.
Implementations§
Source§impl<TCommand, TState, TEvent, TEffect> ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
impl<TCommand, TState, TEvent, TEffect> ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
Sourcepub fn new(
initial_state: TState,
reduce: impl Fn(&ProcessCommand<TCommand>, TState) -> ProcessReduction<TState, TEvent, TEffect> + 'static,
) -> Self
pub fn new( initial_state: TState, reduce: impl Fn(&ProcessCommand<TCommand>, TState) -> ProcessReduction<TState, TEvent, TEffect> + 'static, ) -> Self
Creates or computes new.
Trait Implementations§
Source§impl<TCommand: Clone, TState: Clone, TEvent: Clone, TEffect: Clone> Clone for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
impl<TCommand: Clone, TState: Clone, TEvent: Clone, TEffect: Clone> Clone for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
Source§fn clone(&self) -> ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
fn clone(&self) -> ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<TCommand, TState, TEvent, TEffect> Freeze for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>where
TState: Freeze,
impl<TCommand, TState, TEvent, TEffect> !RefUnwindSafe for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
impl<TCommand, TState, TEvent, TEffect> !Send for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
impl<TCommand, TState, TEvent, TEffect> !Sync for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
impl<TCommand, TState, TEvent, TEffect> Unpin for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>where
TState: Unpin,
impl<TCommand, TState, TEvent, TEffect> UnsafeUnpin for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>where
TState: UnsafeUnpin,
impl<TCommand, TState, TEvent, TEffect> !UnwindSafe for ProcessBundleOptions<TCommand, TState, TEvent, TEffect>
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