Trait Poller

Source
pub trait Poller<ResponseType, MetadataType>: Send + Poller {
    // Required methods
    fn poll(
        &mut self,
    ) -> impl Future<Output = Option<PollingResult<ResponseType, MetadataType>>> + Send;
    fn until_done(
        self,
    ) -> impl Future<Output = Result<ResponseType, Error>> + Send;
}
Expand description

Automatically polls long-running operations.

§Parameters

  • ResponseType - This is the type returned when the LRO completes successfully.
  • MetadataType - The LRO may return values of this type while the operation is in progress. This may include some measure of “progress”.

Required Methods§

Source

fn poll( &mut self, ) -> impl Future<Output = Option<PollingResult<ResponseType, MetadataType>>> + Send

Query the current status of the long-running operation.

Source

fn until_done(self) -> impl Future<Output = Result<ResponseType, Error>> + Send

Poll the long-running operation until it completes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§