pub async fn capture(window: Option<Window>) -> Result<File>