pub async fn with_timeout<F, T>(
duration: Duration,
future: F,
) -> Result<T, TimeoutError>where
F: Future<Output = T>,Expand description
Execute an async operation with timeout using tokio.
pub async fn with_timeout<F, T>(
duration: Duration,
future: F,
) -> Result<T, TimeoutError>where
F: Future<Output = T>,Execute an async operation with timeout using tokio.