Skip to main content

ClassicPullCallback

Trait ClassicPullCallback 

Source
pub trait ClassicPullCallback:
    Send
    + Sync
    + 'static {
    // Required methods
    fn on_success(&self, pull_result: PullResult);
    fn on_exception(&self, error: ClientError);
}
Expand description

Callback for an asynchronous Classic Pull request.

Required Methods§

Source

fn on_success(&self, pull_result: PullResult)

Receives one fully decoded and filtered pull result.

Source

fn on_exception(&self, error: ClientError)

Receives a transport, broker, timeout, or validation error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> ClassicPullCallback for F
where F: Fn(Result<PullResult, ClientError>) + Send + Sync + 'static,

Function callback accepted by DefaultMQPullConsumer::pull_async_with_options.