pub struct AddBindingBuilder { /* private fields */ }Expand description
Builder for AddBinding.
Implementations§
Source§impl AddBindingBuilder
impl AddBindingBuilder
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn execution_context_id<VALUE: Into<ExecutionContextId>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn execution_context_id<VALUE: Into<ExecutionContextId>>( &mut self, value: VALUE, ) -> &mut Self
If specified, the binding would only be exposed to the specified
execution context. If omitted and executionContextName is not set,
the binding is exposed to all execution contexts of the target.
This parameter is mutually exclusive with executionContextName.
Deprecated in favor of executionContextName due to an unclear use case
and bugs in implementation (crbug.com/1169639). executionContextId will be
removed in the future.
Sourcepub fn execution_context_name<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn execution_context_name<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
If specified, the binding is exposed to the executionContext with
matching name, even for contexts created after the binding is added.
See also ExecutionContext.name and worldName parameter to
Page.addScriptToEvaluateOnNewDocument.
This parameter is mutually exclusive with executionContextId.
Sourcepub fn build(&self) -> Result<AddBinding, AddBindingBuilderError>
pub fn build(&self) -> Result<AddBinding, AddBindingBuilderError>
Trait Implementations§
Source§impl Clone for AddBindingBuilder
impl Clone for AddBindingBuilder
Source§fn clone(&self) -> AddBindingBuilder
fn clone(&self) -> AddBindingBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AddBindingBuilder
impl RefUnwindSafe for AddBindingBuilder
impl Send for AddBindingBuilder
impl Sync for AddBindingBuilder
impl Unpin for AddBindingBuilder
impl UnsafeUnpin for AddBindingBuilder
impl UnwindSafe for AddBindingBuilder
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