pub trait ScreenTrait:
Debug
+ PartialEq
+ Eq
+ Clone
+ Copy
+ Hash
+ Send
+ Sync {
type Action: ActionTrait<State = Self::State>;
type State: Send + Sync + 'static;
// Required method
fn resolve(
&self,
state: &<<Self as ScreenTrait>::Action as ActionTrait>::State,
) -> Menu<Self>;
}Expand description
Each Menu / Screen uses this trait to define which menu items lead to which other screens
Required Associated Types§
Required Methods§
fn resolve( &self, state: &<<Self as ScreenTrait>::Action as ActionTrait>::State, ) -> Menu<Self>
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.