#[repr(C)]
pub struct Performance { eventtarget: EventTarget, buffer: DomRefCell<PerformanceEntryList>, observers: DomRefCell<Vec<PerformanceObserver>>, pending_notification_observers_task: Cell<bool>, navigation_start_precise: u64, resource_timing_buffer_size_limit: Cell<usize>, resource_timing_buffer_current_size: Cell<usize>, resource_timing_buffer_pending_full_event: Cell<bool>, resource_timing_secondary_entries: DomRefCell<VecDeque<Root<Dom<PerformanceEntry>>>>, }

Fields

eventtarget: EventTargetbuffer: DomRefCell<PerformanceEntryList>observers: DomRefCell<Vec<PerformanceObserver>>pending_notification_observers_task: Cell<bool>navigation_start_precise: u64resource_timing_buffer_size_limit: Cell<usize>

https://w3c.github.io/performance-timeline/#dfn-maxbuffersize The max-size of the buffer, set to 0 once the pipeline exits. TODO: have one max-size per entry type.

resource_timing_buffer_current_size: Cell<usize>resource_timing_buffer_pending_full_event: Cell<bool>resource_timing_secondary_entries: DomRefCell<VecDeque<Root<Dom<PerformanceEntry>>>>

Implementations

source

pub fn clear_and_disable_performance_entry_buffer(&self)

Clear all buffered performance entries, and disable the buffer. Called as part of the window’s “clear_js_runtime” workflow, performed when exiting a pipeline.

Add a PerformanceObserver to the list of observers with a set of observed entry types.

Remove a PerformanceObserver from the list of observers.

source

pub fn queue_entry(&self, entry: &PerformanceEntry) -> Option<usize>

Queue a notification for each performance observer interested in this type of performance entry and queue a low priority task to notify the observers if no other notification task is already queued.

Algorithm spec: https://w3c.github.io/performance-timeline/#queue-a-performanceentry Also this algorithm has been extented according to : https://w3c.github.io/resource-timing/#sec-extensions-performance-interface

Observers notifications task.

Algorithm spec (step 7): https://w3c.github.io/performance-timeline/#queue-a-performanceentry

source

fn can_add_resource_timing_entry(&self) -> bool

source

fn should_queue_resource_entry(&self, entry: &PerformanceEntry) -> bool

add a PerformanceResourceTiming entry paragraph of https://w3c.github.io/resource-timing/#sec-extensions-performance-interface

source

pub fn update_entry(&self, index: usize, entry: &PerformanceEntry)

Trait Implementations

Check whether a DOM object implements one of its deriving interfaces.
Cast a DOM object upwards to one of the interfaces it derives from.
Cast a DOM object downwards to one of the interfaces it might implement.
Returns the receiver’s reflector.
Returns the global scope of the realm that the DomObject was created in.
Function pointer to the general wrap function type

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

Returns whether the given DOM class derives that interface.
Trace self.
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
Initializes the Reflector
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Convert self to a JSVal. JSAPI failure causes a panic.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert
Convert
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more