Skip to main content

PopCallback

Trait PopCallback 

Source
pub trait PopCallback: Send {
    // Required methods
    fn on_success(
        &mut self,
        pop_result: PopResult,
    ) -> impl Future<Output = ()> + Send;
    fn on_error(&mut self, e: ClientError);
}
Expand description

Trait for handling the results of a pop operation.

This trait defines the methods for handling successful and error results of a pop operation.

Required Methods§

Source

fn on_success( &mut self, pop_result: PopResult, ) -> impl Future<Output = ()> + Send

Called when the pop operation is successful.

§Arguments
  • pop_result - The result of the pop operation.
Source

fn on_error(&mut self, e: ClientError)

Called when the pop operation encounters an error.

§Arguments
  • e - The error encountered during the pop operation.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§