Skip to content

Instantly share code, notes, and snippets.

@tailhook
Last active January 2, 2016 02:15
Show Gist options
  • Select an option

  • Save tailhook/7f824ed66a53f90afbef to your computer and use it in GitHub Desktop.

Select an option

Save tailhook/7f824ed66a53f90afbef to your computer and use it in GitHub Desktop.
// Most rotor_stream::Protocol actions:
enum Expectation { Bytes(usize), Delimiter(&str) }
Option<(Machine, Expectation, Deadline)>
// rotor_http::Server actions:
enum Mode { Buffered, Progressive }
fn headers_received(..) -> Option<(Machine, Mode, Deadline)>;
fn request_received(..) -> Option<Machine>;
fn request_chunk(..) -> Option<Machine>;
fn timeout(..) -> Option<(Machine, Deadline)>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment