async fn within<T>( limit: Option<Duration>, work: impl Future<Output = Result<T, String>>, ) -> Result<T, String>
work, or its failure when it takes longer than limit.
work
limit