pub enum Command {
Reload,
Update {
title: String,
body: String,
diff: bool,
},
Evaluate {
script: String,
statement_mode: bool,
id: Uuid,
},
}
Expand description
A command sent directly to the code running in the browser page to tell it to update or perform some other action.
Variants§
Reload
Reload the page completely, i.e. via window.location.reload()
.
Update
Update the page’s dynamic content by setting window.title
to the given
title, and setting the contents of the <body>
to the given body,
either by means of a DOM diff (if diff == true
) or directly by setting
.innerHTML
(if diff == false
).
Fields
Evaluate
Evaluate some JavaScript code in the page.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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