pub struct State<T> { /* private fields */ }
Expand description
A wrapper around a value managed by nuit.
Implementations§
Source§impl<T> State<T>where
T: 'static + Clone,
impl<T> State<T>where
T: 'static + Clone,
pub fn new(initial_value: impl Into<T>) -> Self
pub fn is_linked(&self) -> bool
pub fn link(&self, storage: Rc<Storage>, key: StateKey)
pub fn get(&self) -> T
pub fn set(&self, value: impl Into<T>)
pub fn set_with(&self, animation: Animation, value: impl Into<T>)
pub fn binding(&self) -> Binding<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for State<T>
impl<T> !RefUnwindSafe for State<T>
impl<T> !Send for State<T>
impl<T> !Sync for State<T>
impl<T> Unpin for State<T>where
T: Unpin,
impl<T> !UnwindSafe for State<T>
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