fn timeout_font_task(family: &str, weight: &str) -> impl Future<Output = Result<JsValue, JsValue>> {
    let timeout_msg = format!("Timeout awaiting font \"{}:{}\"", family, weight);
    async {
        set_timeout(FONT_DOWNLOAD_TIMEOUT_MS).await?;
        Err(timeout_msg.into())
    }
}
// An async task which times out.  Can be used to timeout an optional async task
// by combinging with `Promise::any`.
An async task which times out.  Can be used to timeout an optional async task
by combinging with `Promise::any`.
An async task which times out . Can be used to timeout an optional async task by combinging with ` Promise :: any ` .
fn timeout_font_task(family: &str, weight: &str) -> impl Future<Output = Result<JsValue, JsValue>> {
    let timeout_msg = format!("Timeout awaiting font \"{}:{}\"", family, weight);
    async {
        set_timeout(FONT_DOWNLOAD_TIMEOUT_MS).await?;
        Err(timeout_msg.into())
    }
}
fn timeout_font_task ( family : & str , weight : & str ) -> impl Future < Output = Result < JsValue , JsValue > > { let timeout_msg = format ! ( " \" \" " family weight ) ; async { set_timeout ( FONT_DOWNLOAD_TIMEOUT_MS ) . await ? ; Err ( timeout_msg . into ( ) ) } }
An async task which times out.
An async task which times out .
family
&str
weight
&str
family
&str
weight
&str