[−][src]Struct atomic_hooks::ReactiveStateAccess
Accessor struct that provides access to getting and setting the state of the stored type
Fields
id: StorageKey
_phantom_data_stored_type: PhantomData<T>
_phantom_data_undo: PhantomData<U>
_phantom_data_accessor_type: PhantomData<A>
Implementations
impl<T, U, A> ReactiveStateAccess<T, U, A> where
T: 'static,
[src]
T: 'static,
pub fn new(id: StorageKey) -> ReactiveStateAccess<T, U, A>
[src]
pub fn insert_set(self, value: T) where
Self: OverloadedUpdateStateAccess<T>,
[src]
Self: OverloadedUpdateStateAccess<T>,
pub fn set(self, value: T) where
Self: OverloadedUpdateStateAccess<T>,
[src]
Self: OverloadedUpdateStateAccess<T>,
pub fn remove(self) -> Option<T>
[src]
pub fn delete(self)
[src]
pub fn undo(&self) where
Self: OverloadedUpdateStateAccess<T>,
[src]
Self: OverloadedUpdateStateAccess<T>,
pub fn update<F: FnOnce(&mut T)>(&self, func: F) where
Self: OverloadedUpdateStateAccess<T>,
[src]
Self: OverloadedUpdateStateAccess<T>,
updates the stored state in place using the provided function
pub fn reset_to_default(&self) where
Self: OverloadedUpdateStateAccess<T>,
[src]
Self: OverloadedUpdateStateAccess<T>,
pub fn state_exists(self) -> bool
[src]
pub fn get_with<F: FnOnce(&T) -> R, R>(&self, func: F) -> R
[src]
pub fn on_update<F: FnOnce() -> R, R>(&self, func: F) -> Option<R>
[src]
Trait Implementations
impl<T, U, A> Add<ReactiveStateAccess<T, U, A>> for ReactiveStateAccess<T, U, A> where
T: Copy + Add<Output = T> + 'static,
[src]
T: Copy + Add<Output = T> + 'static,
type Output = T
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
impl<T, U, A> ChangedAtomState for ReactiveStateAccess<T, U, A> where
T: Clone + 'static + PartialEq,
[src]
T: Clone + 'static + PartialEq,
impl<T, U, A> Clone for ReactiveStateAccess<T, U, A>
[src]
fn clone(&self) -> ReactiveStateAccess<T, U, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T, U, A> CloneReactiveState<T> for ReactiveStateAccess<T, U, A> where
T: Clone + 'static,
[src]
T: Clone + 'static,
fn get(&self) -> T
[src]
returns a clone of the stored state panics if not stored.
fn soft_get(&self) -> Option<T>
[src]
impl<T, U, A> Copy for ReactiveStateAccess<T, U, A>
[src]
impl<T, U, A> Debug for ReactiveStateAccess<T, U, A>
[src]
impl<T, U, A> Display for ReactiveStateAccess<T, U, A> where
T: Display + 'static,
[src]
T: Display + 'static,
impl<T, U, A> Div<ReactiveStateAccess<T, U, A>> for ReactiveStateAccess<T, U, A> where
T: Copy + Div<Output = T> + 'static,
[src]
T: Copy + Div<Output = T> + 'static,
type Output = T
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self::Output
[src]
impl<T, U, A> Mul<ReactiveStateAccess<T, U, A>> for ReactiveStateAccess<T, U, A> where
T: Copy + Mul<Output = T> + 'static,
[src]
T: Copy + Mul<Output = T> + 'static,
type Output = T
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
impl<T, U, A> Observable<T> for ReactiveStateAccess<T, U, A> where
T: 'static,
[src]
T: 'static,
fn observe(&self) -> T where
T: Clone,
[src]
T: Clone,
fn observe_with<F: FnOnce(&T) -> R, R>(&self, func: F) -> R
[src]
impl<T, U, A> ObservableVec<T, U, A> for ReactiveStateAccess<Vec<T>, U, A> where
T: 'static,
[src]
T: 'static,
fn observe_and_filter<F: FnMut(usize, &T) -> Option<usize>>(
&self,
func: F
) -> FilterVec<T, U, A>
[src]
&self,
func: F
) -> FilterVec<T, U, A>
impl<T, U, A, UB, AB> ObservableVec<T, U, A> for ReactiveStateAccess<FilterVec<T, U, A>, UB, AB> where
T: 'static,
[src]
T: 'static,
fn observe_and_filter<F: FnMut(usize, &T) -> Option<usize>>(
&self,
func: F
) -> FilterVec<T, U, A>
[src]
&self,
func: F
) -> FilterVec<T, U, A>
impl<T> OverloadedUpdateStateAccess<T> for ReactiveStateAccess<T, NoUndo, IsAnAtomState> where
T: 'static,
[src]
T: 'static,
fn overloaded_undo(&self)
[src]
fn overloaded_reset_to_default(&self)
[src]
fn overloaded_update<F: FnOnce(&mut T)>(&self, func: F)
[src]
fn overloaded_inert_set(self, value: T)
[src]
fn overloaded_set(self, value: T)
[src]
impl<T> OverloadedUpdateStateAccess<T> for ReactiveStateAccess<T, AllowUndo, IsAnAtomState> where
T: Clone + 'static,
[src]
T: Clone + 'static,
fn overloaded_reset_to_default(&self)
[src]
fn overloaded_undo(&self)
[src]
fn overloaded_update<F: FnOnce(&mut T)>(&self, func: F)
[src]
fn overloaded_inert_set(self, value: T)
[src]
fn overloaded_set(self, value: T)
[src]
impl<T, U, A> Sub<ReactiveStateAccess<T, U, A>> for ReactiveStateAccess<T, U, A> where
T: Copy + Sub<Output = T> + 'static,
[src]
T: Copy + Sub<Output = T> + 'static,
Auto Trait Implementations
impl<T, U, A> RefUnwindSafe for ReactiveStateAccess<T, U, A> where
A: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U, A> Send for ReactiveStateAccess<T, U, A> where
A: Send,
T: Send,
U: Send,
A: Send,
T: Send,
U: Send,
impl<T, U, A> Sync for ReactiveStateAccess<T, U, A> where
A: Sync,
T: Sync,
U: Sync,
A: Sync,
T: Sync,
U: Sync,
impl<T, U, A> Unpin for ReactiveStateAccess<T, U, A> where
A: Unpin,
T: Unpin,
U: Unpin,
A: Unpin,
T: Unpin,
U: Unpin,
impl<T, U, A> UnwindSafe for ReactiveStateAccess<T, U, A> where
A: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
A: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
[src]
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
[src]
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
[src]
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
[src]
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,