Skip to content

Instantly share code, notes, and snippets.

@polachok
Last active December 22, 2016 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polachok/b4cc89b7062b4b724c90af41dd0f6019 to your computer and use it in GitHub Desktop.
Save polachok/b4cc89b7062b4b724c90af41dd0f6019 to your computer and use it in GitHub Desktop.
impl AmqpClient {
fn call(&mut self, Request::Channel::Open) -> Future<Channel, AmqpError>
}
impl Channel {
fn declare_queue(&mut self, name: AsRef<str>) -> Future<Queue, AmqpError>
}
impl Queue {
fn consume(&mut self) -> Future<MessageStream, AmqpError>
}
// or
impl AmqpClient {
fn call(&mut self, Request::Channel::Open) -> Future<Channel, AmqpError>
fn call(&mut self, Request::Channel::DeclareQueue(Channel, AsRef<str>)) -> Future<Queue, AmqpError>
fn call(&mut self, Request::Queue::Consume(Queue)) -> Future<MessageStream, AmqpError>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment