pub trait Program<Message> {
fn draw(
&self,
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(
&mut self,
_event: Event,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> (Status, Option<Message>) { ... }
fn mouse_interaction(
&self,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction { ... }
}
Available on crate feature
canvas
only.Expand description
Required Methods
Provided Methods
fn mouse_interaction(
&self,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
fn mouse_interaction(
&self,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
Implementations on Foreign Types
sourceimpl<'_, T, Message> Program<Message> for &'_ mut T where
T: Program<Message>,
impl<'_, T, Message> Program<Message> for &'_ mut T where
T: Program<Message>,
fn update(
&mut self,
event: Event,
bounds: Rectangle<f32>,
cursor: Cursor
) -> (Status, Option<Message>)
fn draw(&self, 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,