Skip to main content

ScopeReducer

Struct ScopeReducer 

Source
pub struct ScopeReducer<R, PS: 'static, PA: 'static, CS: 'static, CA: 'static, AK, SK>
where AK: Clone + 'static, SK: RefKpTrait<PS, CS>,
{ pub state_kp: SK, pub action_kp: AK, pub cancel_id: EffectId, pub child: R, /* private fields */ }
Expand description

Focuses nested state/action and runs a child reducer (UDF Scope).

Fields§

§state_kp: SK§action_kp: AK§cancel_id: EffectId§child: R

Implementations§

Source§

impl<R, PS: 'static, PA: 'static, CS: 'static, CA: 'static, AK, SK> ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where AK: Clone + 'static, SK: RefKpTrait<PS, CS>,

Source

pub fn new(state_kp: SK, action_kp: AK, cancel_id: EffectId, child: R) -> Self

Trait Implementations§

Source§

impl<R: Debug, PS: Debug + 'static, PA: Debug + 'static, CS: Debug + 'static, CA: Debug + 'static, AK, SK> Debug for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where AK: Clone + Debug + 'static, SK: RefKpTrait<PS, CS> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<R, PS: 'static, PA, CS: 'static, CA, AK, SK> Reducer for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where R: Reducer<State = CS, Action = CA>, PA: Send + 'static, CA: Clone + Send + 'static, AK: Casepath<PA, CA> + Clone + Send + Sync + 'static, SK: RefKpTrait<PS, CS>,

Source§

type State = PS

Source§

type Action = PA

Source§

fn reduce(&self, state: &mut PS, action: PA) -> Cmd<PA>

Auto Trait Implementations§

§

impl<R, PS, PA, CS, CA, AK, SK> Freeze for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where SK: Freeze, AK: Freeze, R: Freeze,

§

impl<R, PS, PA, CS, CA, AK, SK> RefUnwindSafe for ScopeReducer<R, PS, PA, CS, CA, AK, SK>

§

impl<R, PS, PA, CS, CA, AK, SK> Send for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where SK: Send, AK: Send, R: Send, PA: Send, CA: Send, PS: Send, CS: Send,

§

impl<R, PS, PA, CS, CA, AK, SK> Sync for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where SK: Sync, AK: Sync, R: Sync, PA: Sync, CA: Sync, PS: Sync, CS: Sync,

§

impl<R, PS, PA, CS, CA, AK, SK> Unpin for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where SK: Unpin, AK: Unpin, R: Unpin, PA: Unpin, CA: Unpin, PS: Unpin, CS: Unpin,

§

impl<R, PS, PA, CS, CA, AK, SK> UnsafeUnpin for ScopeReducer<R, PS, PA, CS, CA, AK, SK>
where SK: UnsafeUnpin, AK: UnsafeUnpin, R: UnsafeUnpin,

§

impl<R, PS, PA, CS, CA, AK, SK> UnwindSafe for ScopeReducer<R, PS, PA, CS, CA, AK, SK>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V