pub struct SetScriptSourceParams<'a> { /* private fields */ }Expand description
Edits JavaScript source live.
In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a ‘Debugger.restartFrame’ for the top-most function is automatically triggered.
Implementations§
Source§impl<'a> SetScriptSourceParams<'a>
impl<'a> SetScriptSourceParams<'a>
Sourcepub fn builder(
script_id: ScriptId<'a>,
script_source: impl Into<Cow<'a, str>>,
) -> SetScriptSourceParamsBuilder<'a>
pub fn builder( script_id: ScriptId<'a>, script_source: impl Into<Cow<'a, str>>, ) -> SetScriptSourceParamsBuilder<'a>
Creates a builder for this type with the required parameters:
script_id: Id of the script to edit.script_source: New content of the script.
Sourcepub fn script_source(&self) -> &str
pub fn script_source(&self) -> &str
New content of the script.
Sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
Sourcepub fn allow_top_frame_editing(&self) -> Option<bool>
pub fn allow_top_frame_editing(&self) -> Option<bool>
If true, then ‘scriptSource’ is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for SetScriptSourceParams<'a>
impl<'a> CdpCommand<'a> for SetScriptSourceParams<'a>
Source§impl<'a> Clone for SetScriptSourceParams<'a>
impl<'a> Clone for SetScriptSourceParams<'a>
Source§fn clone(&self) -> SetScriptSourceParams<'a>
fn clone(&self) -> SetScriptSourceParams<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SetScriptSourceParams<'a>
impl<'a> Debug for SetScriptSourceParams<'a>
Source§impl<'a> Default for SetScriptSourceParams<'a>
impl<'a> Default for SetScriptSourceParams<'a>
Source§fn default() -> SetScriptSourceParams<'a>
fn default() -> SetScriptSourceParams<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for SetScriptSourceParams<'a>
impl<'de, 'a> Deserialize<'de> for SetScriptSourceParams<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for SetScriptSourceParams<'a>
impl<'a> RefUnwindSafe for SetScriptSourceParams<'a>
impl<'a> Send for SetScriptSourceParams<'a>
impl<'a> Sync for SetScriptSourceParams<'a>
impl<'a> Unpin for SetScriptSourceParams<'a>
impl<'a> UnsafeUnpin for SetScriptSourceParams<'a>
impl<'a> UnwindSafe for SetScriptSourceParams<'a>
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