Function apply_timeout

Source
pub async fn apply_timeout<F, T>(
    future: F,
    duration: Duration,
    timeout_message: &str,
) -> Result<T, Response>
where F: Future<Output = T>,
Expand description

Helper function to apply timeout to a future