pub struct Launcher { /* private fields */ }Expand description
Builder used to launch or connect to a Chromium-based browser instance.
§Examples
use cdp_core::Browser;
let browser = Browser::launcher()
.port(9222)
.launch()
.await?;Implementations§
Source§impl Launcher
impl Launcher
pub fn port(self, port: u16) -> Self
pub fn connect_to_existing(self, addr: &str) -> Self
pub fn browser(self, browser: BrowserType) -> Self
pub fn launch_options(self, options: BrowserLaunchOptions) -> Self
pub fn configure_options( self, configure: impl FnOnce(&mut BrowserLaunchOptions), ) -> Self
pub fn disable_images(self, disable: bool) -> Self
pub fn mute_audio(self, mute: bool) -> Self
pub fn incognito(self, incognito: bool) -> Self
pub fn user_data_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn clear_user_data_dir(self) -> Self
pub fn profile_directory<S: Into<String>>(self, profile: S) -> Self
pub fn clear_profile_directory(self) -> Self
pub fn add_extension<P: Into<PathBuf>>(self, path: P) -> Self
pub fn remove_extension<P: AsRef<Path>>(self, path: P) -> Self
pub fn clear_extensions(self) -> Self
pub fn disable_extensions_except<I, S>(self, ids: I) -> Self
pub fn remove_default_flag<S: Into<String>>(self, flag: S) -> Self
pub fn arg<S: Into<String>>(self, arg: S) -> Self
pub fn set_switch_flag<S: Into<String>>(self, switch: S) -> Self
pub fn set_switch_value<S, V>(self, switch: S, value: V) -> Self
pub fn clear_switch<S: Into<String>>(self, switch: S) -> Self
pub fn enable_feature<S: Into<String>>(self, feature: S) -> Self
pub fn disable_feature<S: Into<String>>(self, feature: S) -> Self
pub fn force_field_trial<S: Into<String>>(self, trial: S) -> Self
pub async fn launch(self) -> Result<Arc<Browser>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Launcher
impl RefUnwindSafe for Launcher
impl Send for Launcher
impl Sync for Launcher
impl Unpin for Launcher
impl UnwindSafe for Launcher
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