Trait UseState

Source
pub trait UseState: Sealed {
    // Required method
    fn use_state<T, F>(&mut self, init: F) -> State<T>
       where F: FnOnce() -> T,
             T: Unpin + Send + Sync + 'static;
}

Required Methods§

Source

fn use_state<T, F>(&mut self, init: F) -> State<T>
where F: FnOnce() -> T, T: Unpin + Send + Sync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl UseState for Hooks<'_, '_>