pub async fn with_timeout_error<T>(
operation: impl Future<Output = Result<T>>,
duration: Duration,
) -> Result<T>Expand description
Wrap an async operation with a timeout, converting Elapsed errors to ProtocolError::Timeout
ยงErrors
Returns ProtocolError::Timeout if the operation times out, otherwise propagates any error from the operation