Use the await keyword on async functions to pause execution until a result is ready, or chain calls to process data sequentially.
use trpl::Html;
async fn page_title(url: &str) -> Option<String> {
let response_text = trpl::get(url).await.text().await;
Html::parse(&response_text)
.select_first("title")
.map(|title| title.inner_html())
}
This pattern fetches data from a URL and extracts the HTML title without blocking the main thread.