[][src]Struct headless_chrome::LaunchOptionsBuilder

pub struct LaunchOptionsBuilder<'a> { /* fields omitted */ }

Builder for LaunchOptions.

Methods

impl<'a> LaunchOptionsBuilder<'a>[src]

pub fn headless(&mut self, value: bool) -> &mut Self[src]

Determintes whether to run headless version of the browser. Defaults to true.

pub fn sandbox(&mut self, value: bool) -> &mut Self[src]

Determines whether to run the browser with a sandbox.

pub fn window_size(&mut self, value: Option<(u32, u32)>) -> &mut Self[src]

Launch the browser with a specific window width and height.

pub fn port(&mut self, value: Option<u16>) -> &mut Self[src]

Launch the browser with a specific debugging port.

pub fn path(&mut self, value: Option<PathBuf>) -> &mut Self[src]

Path for Chrome or Chromium.

If unspecified, the create will try to automatically detect a suitable binary.

pub fn extensions(&mut self, value: Vec<&'a OsStr>) -> &mut Self[src]

A list of Chrome extensions to load.

An extension should be a path to a folder containing the extension code. CRX files cannot be used directly and must be first extracted.

Note that Chrome does not support loading extensions in headless-mode. See https://bugs.chromium.org/p/chromium/issues/detail?id=706008#c5

pub fn revision(&mut self, value: &'static str) -> &mut Self[src]

The revision of chrome to use

By default, we'll use a revision guaranteed to work with our API.

pub fn idle_browser_timeout(&mut self, value: Duration) -> &mut Self[src]

How long to keep the WebSocket to the browser for after not receiving any events from it Defaults to 30 seconds

pub fn build(&self) -> Result<LaunchOptions<'a>, String>[src]

Builds a new LaunchOptions.

Errors

If a required field has not been initialized.

Trait Implementations

impl<'a> Clone for LaunchOptionsBuilder<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Default for LaunchOptionsBuilder<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.