pub enum PollingResult<R, M> {
InProgress(Option<M>),
Completed(Result<R, Error>),
PollingError(Error),
}
Expand description
The result of polling a Long-Running Operation (LRO).
§Parameters
R
- the response type. This is the type returned when the LRO completes successfully.M
- the metadata type. While operations are in progress the LRO may return values of this type.
Variants§
InProgress(Option<M>)
The operation is still in progress.
Completed(Result<R, Error>)
The operation completed. This includes the result.
PollingError(Error)
An error trying to poll the LRO.
Not all errors indicate that the operation failed. For example, this may fail because it was not possible to connect to Google Cloud. Such transient errors may disappear in the next polling attempt.
Other errors will never recover. For example, a ServiceError with a NOT_FOUND, ABORTED, or PERMISSION_DENIED code will never recover.
Trait Implementations§
Auto Trait Implementations§
impl<R, M> Freeze for PollingResult<R, M>
impl<R, M> !RefUnwindSafe for PollingResult<R, M>
impl<R, M> Send for PollingResult<R, M>
impl<R, M> Sync for PollingResult<R, M>
impl<R, M> Unpin for PollingResult<R, M>
impl<R, M> !UnwindSafe for PollingResult<R, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more