pub trait ChannelCallback {
// Required methods
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
close: CloseChannel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
cancel: Cancel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn flow<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
active: bool,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn publish_ack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ack: Ack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn publish_nack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
nack: Nack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn publish_return<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ret: Return,
basic_properties: BasicProperties,
content: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Callback interfaces for asynchronous Channel class message.
See module documentation for general guidelines.
Required Methods§
Sourcefn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
close: CloseChannel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
close: CloseChannel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn cancel<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
cancel: Cancel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
cancel: Cancel,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn flow<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
active: bool,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn flow<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
active: bool,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn publish_ack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ack: Ack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn publish_ack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ack: Ack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Callback to handle ack indication from server.
Only occurs in publish confirm mode, sent by server to acknowledges
one or more messages published.
Sourcefn publish_nack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
nack: Nack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn publish_nack<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
nack: Nack,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Callback to handle nack indication from server.
Only occurs in publish confirm mode, sent by server to inform publisher
of unhandled messages.
Sourcefn publish_return<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ret: Return,
basic_properties: BasicProperties,
content: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn publish_return<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel: &'life1 Channel,
ret: Return,
basic_properties: BasicProperties,
content: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Callback to handle return indication with undeliverable message from server.
The ret contains the reason why the message is returned.
The basic_properties contains the propertities of the returned message.
The content contains the body of the returned message.