pub struct BrowserType { /* private fields */ }Expand description
A browser engine. Created from a Playwright handle.
Implementations§
Source§impl BrowserType
impl BrowserType
Sourcepub fn executable_path(&self) -> Option<PathBuf>
pub fn executable_path(&self) -> Option<PathBuf>
Best-effort discovery of the executable path for this engine.
Sourcepub async fn launch_with_options(&self, opts: LaunchOptions) -> Result<Browser>
pub async fn launch_with_options(&self, opts: LaunchOptions) -> Result<Browser>
Launch a browser with the given options.
Only Chromium is driven here; firefox/webkit log a warning and fall
back to launching Chromium (kept for porting compatibility).
Sourcepub async fn connect_over_cdp(
&self,
endpoint: &str,
opts: Option<ConnectOverCdpOptions>,
) -> Result<Browser>
pub async fn connect_over_cdp( &self, endpoint: &str, opts: Option<ConnectOverCdpOptions>, ) -> Result<Browser>
Attach to an already-running browser over CDP.
Trait Implementations§
Source§impl Clone for BrowserType
impl Clone for BrowserType
Source§fn clone(&self) -> BrowserType
fn clone(&self) -> BrowserType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BrowserType
Auto Trait Implementations§
impl Freeze for BrowserType
impl RefUnwindSafe for BrowserType
impl Send for BrowserType
impl Sync for BrowserType
impl Unpin for BrowserType
impl UnsafeUnpin for BrowserType
impl UnwindSafe for BrowserType
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