pub struct CallFunctionOnParams {Show 13 fields
pub function_declaration: String,
pub object_id: Option<RemoteObjectId>,
pub arguments: Option<Vec<CallArgument>>,
pub silent: Option<bool>,
pub return_by_value: Option<bool>,
pub generate_preview: Option<bool>,
pub user_gesture: Option<bool>,
pub await_promise: Option<bool>,
pub execution_context_id: Option<ExecutionContextId>,
pub object_group: Option<String>,
pub throw_on_side_effect: Option<bool>,
pub unique_context_id: Option<String>,
pub serialization_options: Option<SerializationOptions>,
}
Expand description
Calls function with given declaration on the given object. Object group of the result is inherited from the target object. callFunctionOn
Fields§
§function_declaration: String
Declaration of the function to call.
object_id: Option<RemoteObjectId>
Identifier of the object to call function on. Either objectId or executionContextId should be specified.
arguments: Option<Vec<CallArgument>>
Call arguments. All call arguments must belong to the same JavaScript world as the target object.
silent: Option<bool>
In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides setPauseOnException
state.
return_by_value: Option<bool>
Whether the result is expected to be a JSON object which should be sent by value.
Can be overriden by serializationOptions
.
generate_preview: Option<bool>
Whether preview should be generated for the result.
user_gesture: Option<bool>
Whether execution should be treated as initiated by user in the UI.
await_promise: Option<bool>
Whether execution should await
for resulting value and return once awaited promise is
resolved.
execution_context_id: Option<ExecutionContextId>
Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
object_group: Option<String>
Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
throw_on_side_effect: Option<bool>
Whether to throw an exception if side effect cannot be ruled out during evaluation.
unique_context_id: Option<String>
An alternative way to specify the execution context to call function on.
Compared to contextId that may be reused across processes, this is guaranteed to be
system-unique, so it can be used to prevent accidental function call
in context different than intended (e.g. as a result of navigation across process
boundaries).
This is mutually exclusive with executionContextId
.
serialization_options: Option<SerializationOptions>
Specifies the result serialization. If provided, overrides
generatePreview
and returnByValue
.
Implementations§
Source§impl CallFunctionOnParams
impl CallFunctionOnParams
pub fn new(function_declaration: impl Into<String>) -> CallFunctionOnParams
Source§impl CallFunctionOnParams
impl CallFunctionOnParams
pub fn builder() -> CallFunctionOnParamsBuilder
Source§impl CallFunctionOnParams
impl CallFunctionOnParams
pub const IDENTIFIER: &'static str = "Runtime.callFunctionOn"
Trait Implementations§
Source§impl Clone for CallFunctionOnParams
impl Clone for CallFunctionOnParams
Source§fn clone(&self) -> CallFunctionOnParams
fn clone(&self) -> CallFunctionOnParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Command for CallFunctionOnParams
impl Command for CallFunctionOnParams
Source§impl Debug for CallFunctionOnParams
impl Debug for CallFunctionOnParams
Source§impl<'de> Deserialize<'de> for CallFunctionOnParams
impl<'de> Deserialize<'de> for CallFunctionOnParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CallFunctionOnParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CallFunctionOnParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<CallFunctionOnParams> for Evaluation
impl From<CallFunctionOnParams> for Evaluation
Source§fn from(params: CallFunctionOnParams) -> Self
fn from(params: CallFunctionOnParams) -> Self
Source§impl From<EvaluateParams> for CallFunctionOnParams
impl From<EvaluateParams> for CallFunctionOnParams
Source§fn from(params: EvaluateParams) -> CallFunctionOnParams
fn from(params: EvaluateParams) -> CallFunctionOnParams
Source§impl<T> From<T> for CallFunctionOnParams
impl<T> From<T> for CallFunctionOnParams
Source§fn from(url: T) -> CallFunctionOnParams
fn from(url: T) -> CallFunctionOnParams
Source§impl Method for CallFunctionOnParams
impl Method for CallFunctionOnParams
Source§fn identifier(&self) -> Cow<'static, str>
fn identifier(&self) -> Cow<'static, str>
DOM.removeNode
Source§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
DOM
Source§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
removeNode
Source§impl MethodType for CallFunctionOnParams
impl MethodType for CallFunctionOnParams
Source§impl PartialEq for CallFunctionOnParams
impl PartialEq for CallFunctionOnParams
Source§impl Serialize for CallFunctionOnParams
impl Serialize for CallFunctionOnParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CallFunctionOnParams
Auto Trait Implementations§
impl Freeze for CallFunctionOnParams
impl RefUnwindSafe for CallFunctionOnParams
impl Send for CallFunctionOnParams
impl Sync for CallFunctionOnParams
impl Unpin for CallFunctionOnParams
impl UnwindSafe for CallFunctionOnParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more