Skip to main content

ScopedStore

Struct ScopedStore 

Source
pub struct ScopedStore<S: 'static, M: 'static, CS: 'static, CM: 'static, AK: 'static, SK>
where SK: RefKpTrait<S, CS> + Clone,
{ /* private fields */ }
Expand description

Child store routing actions through a parent action casepath.

Implementations§

Source§

impl<S, M, CS, CM, AK, SK> ScopedStore<S, M, CS, CM, AK, SK>
where S: Send + Sync + Clone + 'static, M: Send + 'static, CS: Clone + PartialEq + Send + Sync + 'static, CM: Clone + Send + 'static, AK: Casepath<M, CM> + Clone + Send + Sync + 'static, SK: RefKpTrait<S, CS> + Clone,

Source

pub fn send(&self, action: CM) -> StoreTask

Source

pub fn dispatch(&self, action: CM)

Source

pub fn child_state(&self) -> Option<CS>

Source

pub fn binding(&self) -> ProjectedBinding<S, CS, SK>

Zero-copy binding projected to the scoped child via keypath.

Source

pub fn subscribe_state(&self) -> ScopedStateSubscriber<S, CS, SK>
where S: Clone + PartialEq, SK: Clone,

Source

pub fn subscribe_changes(&self) -> ScopedChangeSubscriber<S, CS, SK>
where CS: FieldDiff + Hash,

Field-level changes for the scoped child (hashes computed under lock, no clone of S).

Trait Implementations§

Source§

impl<S, M, CS: 'static, CM: 'static, AK, SK> Clone for ScopedStore<S, M, CS, CM, AK, SK>
where S: Send + 'static, M: Send + 'static, AK: Clone + 'static, SK: RefKpTrait<S, CS> + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<S, M, CS, CM, AK, SK> !RefUnwindSafe for ScopedStore<S, M, CS, CM, AK, SK>

§

impl<S, M, CS, CM, AK, SK> !UnwindSafe for ScopedStore<S, M, CS, CM, AK, SK>

§

impl<S, M, CS, CM, AK, SK> Freeze for ScopedStore<S, M, CS, CM, AK, SK>
where SK: Freeze, AK: Freeze,

§

impl<S, M, CS, CM, AK, SK> Send for ScopedStore<S, M, CS, CM, AK, SK>
where SK: Send, AK: Send, M: Send, CM: Send, S: Send + Sync, CS: Send,

§

impl<S, M, CS, CM, AK, SK> Sync for ScopedStore<S, M, CS, CM, AK, SK>
where SK: Sync, AK: Sync, M: Sync + Send, CM: Sync, S: Sync + Send, CS: Sync,

§

impl<S, M, CS, CM, AK, SK> Unpin for ScopedStore<S, M, CS, CM, AK, SK>
where SK: Unpin, AK: Unpin, M: Unpin, CM: Unpin, S: Unpin, CS: Unpin,

§

impl<S, M, CS, CM, AK, SK> UnsafeUnpin for ScopedStore<S, M, CS, CM, AK, SK>
where SK: UnsafeUnpin, AK: UnsafeUnpin,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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