[−][src]Struct seed_hooks::StateAccess 
Accessor struct that provides access to getting and setting the state of the stored type
Fields
id: IdMethods
impl<T> StateAccess<T> where
    T: 'static, [src]
T: 'static,
pub fn new(id: Id) -> StateAccess<T>[src]
pub fn set(self, value: T)[src]
pub fn remove(self) -> Option<T>[src]
pub fn delete(self)[src]
pub fn reset_on_drop(self) -> StateAccess<T>[src]
pub fn update<F>(self, func: F) where
    F: FnOnce(&mut T), [src]
F: FnOnce(&mut T),
updates the stored state in place using the provided function
pub fn state_exists(self) -> bool[src]
pub fn get_with<F, R>(self, func: F) -> R where
    F: FnOnce(&T) -> R, [src]
F: FnOnce(&T) -> R,
Trait Implementations
impl<T> Add<StateAccess<T>> for StateAccess<T> where
    T: Copy + Add<T, Output = T> + 'static, [src]
T: Copy + Add<T, Output = T> + 'static,
type Output = T
The resulting type after applying the + operator.
fn add(
    self, 
    other: StateAccess<T>
) -> <StateAccess<T> as Add<StateAccess<T>>>::Output[src]
self,
other: StateAccess<T>
) -> <StateAccess<T> as Add<StateAccess<T>>>::Output
impl<T> ChangedState for StateAccess<T> where
    T: Clone + 'static + PartialEq<T>, [src]
T: Clone + 'static + PartialEq<T>,
impl<T> Clone for StateAccess<T>[src]
fn clone(&self) -> StateAccess<T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T> CloneState<T> for StateAccess<T> 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> Copy for StateAccess<T>[src]
impl<T> Debug for StateAccess<T>[src]
impl<T> Display for StateAccess<T> where
    T: Display + 'static, [src]
T: Display + 'static,
impl StateAccessDropType for StateAccess<DropType>[src]
impl<T> StateAccessEventHandlers<T> for StateAccess<T> where
    T: 'static, [src]
T: 'static,
Auto Trait Implementations
impl<T> RefUnwindSafe for StateAccess<T> where
    T: RefUnwindSafe, 
T: RefUnwindSafe,
impl<T> Send for StateAccess<T> where
    T: Send, 
T: Send,
impl<T> Sync for StateAccess<T> where
    T: Sync, 
T: Sync,
impl<T> Unpin for StateAccess<T> where
    T: Unpin, 
T: Unpin,
impl<T> UnwindSafe for StateAccess<T> where
    T: UnwindSafe, 
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Any for T where
    T: Any, 
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, 
T: Clone + Any,
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>,