pub trait Program<Message> {
type State: 'static + Default;
fn draw(
&self,
state: &Self::State,
bounds: Rectangle<f32>,
cursor: Cursor
) -> Vec<Geometry, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn update(
&self,
_state: &mut Self::State,
_event: Event,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> (Status, Option<Message>) { ... }
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction { ... }
}
Available on crate feature
pure
only.Expand description
Required Associated Types
Required Methods
Provided Methods
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
Implementations on Foreign Types
sourceimpl<'_, Message, T> Program<Message> for &'_ T where
T: Program<Message>,
impl<'_, Message, T> Program<Message> for &'_ T where
T: Program<Message>,
type State = <T as Program<Message>>::State
fn update(
&self,
state: &mut <&'_ T as Program<Message>>::State,
event: Event,
bounds: Rectangle<f32>,
cursor: Cursor
) -> (Status, Option<Message>)
fn draw(
&self,
state: &<&'_ T as Program<Message>>::State,
bounds: Rectangle<f32>,
cursor: Cursor
) -> Vec<Geometry, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,