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§
Sourcefn on_success(
&mut self,
pop_result: PopResult,
) -> impl Future<Output = ()> + Send
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.
Sourcefn on_error(&mut self, e: ClientError)
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".