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>> + Send;
fn into_stream(
self,
) -> impl Stream<Item = PollingResult<ResponseType, MetadataType>> + Unpin;
}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§
Sourcefn poll(
&mut self,
) -> impl Future<Output = Option<PollingResult<ResponseType, MetadataType>>> + Send
fn poll( &mut self, ) -> impl Future<Output = Option<PollingResult<ResponseType, MetadataType>>> + Send
Query the current status of the long-running operation.
Sourcefn until_done(self) -> impl Future<Output = Result<ResponseType>> + Send
fn until_done(self) -> impl Future<Output = Result<ResponseType>> + Send
Poll the long-running operation until it completes.
Sourcefn into_stream(
self,
) -> impl Stream<Item = PollingResult<ResponseType, MetadataType>> + Unpin
Available on crate feature unstable-stream only.
fn into_stream( self, ) -> impl Stream<Item = PollingResult<ResponseType, MetadataType>> + Unpin
unstable-stream only.Convert a poller to a Stream.
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.