wrap_timeout

Function wrap_timeout 

Source
pub async fn wrap_timeout<T>(
    dur: Duration,
    fut: impl Future<Output = PGResult<T>>,
) -> PGResult<T>
Expand description

Wraps any future in a tokio timeout and maps the Elapsed error to a PGError::Timeout.