pub struct SetVirtualTimePolicyCommand { /* private fields */ }Available on crate features
Emulation and DOM and Page and Runtime and experimental only.Expand description
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.
Implementations§
Source§impl SetVirtualTimePolicyCommand
impl SetVirtualTimePolicyCommand
pub fn builder() -> SetVirtualTimePolicyCommandBuilder
pub fn policy(&self) -> &JsonValue
Sourcepub fn budget(&self) -> Option<&f64>
pub fn budget(&self) -> Option<&f64>
If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
Sourcepub fn max_virtual_time_task_starvation_count(&self) -> Option<&u32>
pub fn max_virtual_time_task_starvation_count(&self) -> Option<&u32>
If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
If set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.
Sourcepub fn initial_virtual_time(&self) -> Option<&TimeSinceEpoch>
pub fn initial_virtual_time(&self) -> Option<&TimeSinceEpoch>
If set, base::Time::Now will be overriden to initially return this value.
Trait Implementations§
Source§impl Clone for SetVirtualTimePolicyCommand
impl Clone for SetVirtualTimePolicyCommand
Source§fn clone(&self) -> SetVirtualTimePolicyCommand
fn clone(&self) -> SetVirtualTimePolicyCommand
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 moreSource§impl Debug for SetVirtualTimePolicyCommand
impl Debug for SetVirtualTimePolicyCommand
Source§impl<'de> Deserialize<'de> for SetVirtualTimePolicyCommand
impl<'de> Deserialize<'de> for SetVirtualTimePolicyCommand
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 Freeze for SetVirtualTimePolicyCommand
impl RefUnwindSafe for SetVirtualTimePolicyCommand
impl Send for SetVirtualTimePolicyCommand
impl Sync for SetVirtualTimePolicyCommand
impl Unpin for SetVirtualTimePolicyCommand
impl UnwindSafe for SetVirtualTimePolicyCommand
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