Created
January 2, 2016 22:55
-
-
Save tailhook/0abbd4fe1826e715316c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub trait Machine<C>: Sized { | |
| type Seed: Any+Sized; | |
| fn create(seed: Self::Seed, scope: &mut Scope<C>) | |
| -> Result<Self, Box<Error>>; | |
| fn ready(self, events: EventSet, scope: &mut Scope<C>) | |
| -> Response<Self, Self::Seed>; | |
| fn spawned(self, scope: &mut Scope<C>) | |
| -> Response<Self, Self::Seed>; | |
| fn spawn_error(self, _scope: &mut Scope<C>, error: Box<Error>) | |
| -> Option<Self>; | |
| fn timeout(self, scope: &mut Scope<C>) -> Response<Self, Self::Seed>; | |
| fn wakeup(self, scope: &mut Scope<C>) -> Response<Self, Self::Seed>; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment