Struct lapin_futures::channel::Channel
[−]
[src]
pub struct Channel<T> { pub transport: Arc<Mutex<AMQPTransport<T>>>, pub id: u16, }
Channel
provides methods to act on a channel, such as managing queues
Fields
transport: Arc<Mutex<AMQPTransport<T>>>
id: u16
Methods
impl<T: AsyncRead + AsyncWrite + 'static> Channel<T>
[src]
fn queue_declare(&self,
name: &str,
options: &QueueDeclareOptions)
-> Box<Future<Item=(), Error=Error>>
name: &str,
options: &QueueDeclareOptions)
-> Box<Future<Item=(), Error=Error>>
creates a queue
returns a future that resolves once the queue is available
the mandatory
and ìmmediate
options can be set to true,
but the return message will not be handled
fn basic_publish(&self,
queue: &str,
payload: &[u8],
options: &BasicPublishOptions)
-> Box<Future<Item=(), Error=Error>>
queue: &str,
payload: &[u8],
options: &BasicPublishOptions)
-> Box<Future<Item=(), Error=Error>>
publishes a message on a queue
fn basic_consume(&self,
queue: &str,
consumer_tag: &str,
options: &BasicConsumeOptions)
-> Box<Future<Item=Consumer<T>, Error=Error>>
queue: &str,
consumer_tag: &str,
options: &BasicConsumeOptions)
-> Box<Future<Item=Consumer<T>, Error=Error>>
creates a consumer stream
returns a future of a Consumer
that resolves once the method succeeds
Consumer
implements futures::Stream
, so it can be used with any of
the usual combinators
fn basic_ack(&self, delivery_tag: u64) -> Box<Future<Item=(), Error=Error>>
acks a message
fn basic_reject(&self,
delivery_tag: u64,
requeue: bool)
-> Box<Future<Item=(), Error=Error>>
delivery_tag: u64,
requeue: bool)
-> Box<Future<Item=(), Error=Error>>
rejects a message
fn basic_get(&self,
queue: &str,
options: &BasicGetOptions)
-> Box<Future<Item=Message, Error=Error>>
queue: &str,
options: &BasicGetOptions)
-> Box<Future<Item=Message, Error=Error>>
acks a message
fn queue_purge(&self, name: &str) -> Box<Future<Item=(), Error=Error>>
purges a queue
Trait Implementations
impl<T> Clone for Channel<T>
[src]
fn clone(&self) -> Channel<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more