Skip to main content

AckCallback

Trait AckCallback 

Source
pub trait AckCallback {
    // Required methods
    fn on_success(&self, ack_result: AckResult);
    fn on_exception(&self, e: ClientError);
}
Expand description

Trait representing an acknowledgment callback. This trait defines two methods: on_success and on_exception.

Required Methods§

Source

fn on_success(&self, ack_result: AckResult)

Called when the acknowledgment is successful.

§Arguments
  • ack_result - The result of the acknowledgment.
Source

fn on_exception(&self, e: ClientError)

Called when there is an exception during acknowledgment.

§Arguments
  • e - The error that occurred.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§