pub struct BrowserHandle {
pub ws_url: String,
pub family: String,
pub version: String,
pub process_id: Option<u32>,
pub profile_path: PathBuf,
pub download_dir: PathBuf,
pub _ephemeral_dir: Option<TempDir>,
pub _profile_lock: Option<Guard>,
pub stderr_ring: Arc<Mutex<VecDeque<String>>>,
/* private fields */
}Expand description
A running browser. Drop cleans up the engine-specific resources:
aborting chromiumoxide event loops and terminating backend subprocesses.
Fields§
§ws_url: String§family: String§version: String§process_id: Option<u32>OS process id for the primary backend process, when the host spawned one.
profile_path: PathBufResolved on-disk profile directory. Either the persistent profile
path under $XDG_DATA_HOME/afhttp/profiles/<name>/ or the
ephemeral tempdir backing this host.
download_dir: PathBufBrowser-initiated downloads are captured inside the active profile.
_ephemeral_dir: Option<TempDir>Some(path) for the runtime tempdir backing an ephemeral profile.
Dropping the TempDir removes it from disk.
_profile_lock: Option<Guard>Held for persistent profiles so lifecycle tooling can detect active use.
stderr_ring: Arc<Mutex<VecDeque<String>>>Tail of the browser subprocess’s stderr, capped at [STDERR_RING_CAP]
lines.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BrowserHandle
impl !UnwindSafe for BrowserHandle
impl Freeze for BrowserHandle
impl Send for BrowserHandle
impl Sync for BrowserHandle
impl Unpin for BrowserHandle
impl UnsafeUnpin for BrowserHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more