Trait n18ui::UiState [−][src]
pub trait UiState {
fn draw(&self, assets: &Assets, ctx: &Context);
fn ping(
&mut self,
_assets: &mut Assets,
_controller: &mut Controller
) -> (UiResponse, Option<State>) { ... }
}
Expand description
The methods that are required in order to manipulate the user interface.
Required methods
Provided methods
fn ping(
&mut self,
_assets: &mut Assets,
_controller: &mut Controller
) -> (UiResponse, Option<State>)
Trait Implementations
Note the 'static
lifetime in the return type, which is necessary for
this to compile.
See this
thread
on the Rust forum, and how static lifetimes apply to trait
bounds:
As a trait bound, it means the type does not contain any non-static references. E.g., the receiver can hold on to the type for as long as they want and it will never become invalid until they drop it.