pub async fn launch_browser(
headed: bool,
) -> Result<(TempDir, BrowserSession), TailFinError>Expand description
Launch a fresh headless (or headed) browser — no existing Chrome required.
Returns (profile_dir, session). The TempDir is first in the tuple
so the idiomatic let (_profile, session) = launch_browser(...).await?
binding declares _profile before session. Rust drops locals in
reverse declaration order, so session is dropped first (giving
Chromium time to tear down) and _profile is dropped second
(unlinking the profile dir only after Chromium is gone).