Trait Poller

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

The trait implemented by LRO helpers.

§Parameters

  • R - the response type, that is, the type of response included when the long-running operation completes successfully.
  • M - the metadata type, that is, the type returned by the service when the long-running operation is still in progress.

Required Methods§

Source

fn poll(&mut self) -> impl Future<Output = Option<PollingResult<R, M>>>

Query the current status of the long-running operation.

Source

fn until_done(self) -> impl Future<Output = Result<R, Error>>

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§