mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: remove redundant type param
This commit is contained in:
parent
c033a5618b
commit
df3dac183e
12 changed files with 113 additions and 125 deletions
|
|
@ -9,15 +9,9 @@ pub trait App<T: Engine> {
|
|||
pub trait Engine {
|
||||
type Handled;
|
||||
type Rendered;
|
||||
fn setup (&mut self) -> Usually<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn teardown (&mut self) -> Usually<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn handle (&self, _: &mut impl Handle<Self, Self::Handled>)
|
||||
-> Usually<()> where Self: Sized;
|
||||
fn render (&mut self, _: &impl Render<Self, Self::Rendered>)
|
||||
-> Usually<()> where Self: Sized;
|
||||
fn exited (&self) -> bool;
|
||||
fn setup (&mut self) -> Usually<()> { Ok(()) }
|
||||
fn teardown (&mut self) -> Usually<()> { Ok(()) }
|
||||
fn handle (&self, _: &mut impl Handle<Self>) -> Usually<()> where Self: Sized;
|
||||
fn render (&mut self, _: &impl Render<Self>) -> Usually<()> where Self: Sized;
|
||||
fn exited (&self) -> bool;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue