Skip to main content

CreateTargetParamsBuilder

Struct CreateTargetParamsBuilder 

Source
pub struct CreateTargetParamsBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> CreateTargetParamsBuilder<'a>

Source

pub fn left(self, left: i64) -> Self

Frame left origin in DIP (requires newWindow to be true or headless shell).

Source

pub fn top(self, top: i64) -> Self

Frame top origin in DIP (requires newWindow to be true or headless shell).

Source

pub fn width(self, width: u64) -> Self

Frame width in DIP (requires newWindow to be true or headless shell).

Source

pub fn height(self, height: i64) -> Self

Frame height in DIP (requires newWindow to be true or headless shell).

Source

pub fn windowState(self, windowState: WindowState) -> Self

Frame window state (requires newWindow to be true or headless shell). Default is normal.

Source

pub fn browserContextId(self, browserContextId: BrowserContextID<'a>) -> Self

The browser context to create the page in.

Source

pub fn enableBeginFrameControl(self, enableBeginFrameControl: bool) -> Self

Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).

Source

pub fn newWindow(self, newWindow: bool) -> Self

Whether to create a new Window or Tab (false by default, not supported by headless shell).

Source

pub fn background(self, background: bool) -> Self

Whether to create the target in background or foreground (false by default, not supported by headless shell).

Source

pub fn forTab(self, forTab: bool) -> Self

Whether to create the target of type “tab”.

Source

pub fn hidden(self, hidden: bool) -> Self

Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with ‘forTab: true’, ‘newWindow: true’ or ‘background: false’. The life-time of the tab is limited to the life-time of the session.

Source

pub fn focus(self, focus: bool) -> Self

If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.

Source

pub fn build(self) -> CreateTargetParams<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.