Maps this service’s result type (Result<Self::Response, Self::Error>)
to a different value, regardless of whether the future succeeds or
fails.
This is similar to the MapResponse and MapErr combinators,
except that the same function is invoked when the service’s future
completes, whether it completes successfully or fails. This function
takes the Result returned by the service’s future, and returns a
Result.
Like the standard library’s Result::and_then, this method can be
used to implement control flow based on Result values. For example, it
may be used to implement error recovery, by turning some Err
responses from the service into Ok responses. Similarly, some
successful responses from the service could be rejected, by returning an
Err conditionally, depending on the value inside the [Ok.] Finally,
this method can also be used to implement behaviors that must run when a
service’s future completes, regardless of whether it succeeded or failed.
This method can be used to change the Response type of the service
into a different type. It can also be used to change the Error type
of the service.