Function matrix_sdk::timeout::timeout
source ยท pub async fn timeout<F, T>(
future: F,
duration: Duration,
) -> Result<T, ElapsedError>
Expand description
Wait for future
to be completed. future
needs to return
a Result
.
If the given timeout has elapsed the method will stop waiting and return an error.