Skip to main content

InspectorHandle

Struct InspectorHandle 

Source
pub struct InspectorHandle(/* private fields */);

Implementations§

Source§

impl InspectorHandle

Source

pub fn set_gpu_profiling(&self, enabled: bool)

Enables detailed renderer measurements independently of tree inspection.

Source

pub fn gpu_profiling(&self) -> bool

Source

pub fn sync_frames( &self, destination: &mut Vec<FrameRecord>, cursor: &mut FrameCursor, ) -> bool

Synchronizes new frames and delayed render results without cloning unchanged records.

Source

pub fn enabled(&self) -> bool

Whether tree inspection is attached, independently of recording pause.

Source§

impl InspectorHandle

Source§

impl InspectorHandle

Source

pub fn new(capacity: usize) -> Self

Source

pub fn publish_tree(&self, tree: TreeSnapshot)

Source

pub fn tree(&self) -> TreeSnapshot

Source

pub fn with_tree<T>(&self, read: impl FnOnce(&TreeSnapshot) -> T) -> T

Source

pub fn node(&self, id: InspectNodeId) -> Option<NodeSnapshot>

Source

pub fn record_ui(&self, record: FrameRecord)

Source

pub fn record_render(&self, record: FrameRecord)

Source

pub fn frames(&self) -> Vec<FrameRecord>

Source

pub fn clear_frames(&self)

Source

pub fn set_paused(&self, paused: bool)

Source

pub fn paused(&self) -> bool

Source

pub fn set_recording(&self, recording: bool)

Source

pub fn recording(&self) -> bool

Source

pub fn select(&self, node: Option<InspectNodeId>)

Source

pub fn selected(&self) -> Option<InspectNodeId>

Source

pub fn set_hovered(&self, node: Option<InspectNodeId>)

Source

pub fn highlighted(&self) -> Option<InspectNodeId>

Source

pub fn hit_test(&self, point: Point, viewport: Rect) -> Option<InspectNodeId>

Returns the visually foremost inspected node containing point. Later nodes win equal stacking levels, matching retained paint order; deeper nodes win inside the same branch.

Source

pub fn hit_stack(&self, point: Point, viewport: Rect) -> Vec<InspectNodeId>

Returns every inspected node under point, ordered from the most useful visual target to structural fallbacks.

Source

pub fn toggle(&self, node: InspectNodeId, property: StyleProperty) -> bool

Source

pub fn property_enabled( &self, node: InspectNodeId, property: StyleProperty, ) -> Option<bool>

Source

pub fn set_property_value( &self, node: InspectNodeId, property: StyleProperty, value: StyleValue, )

Source

pub fn property_value( &self, node: InspectNodeId, property: StyleProperty, ) -> Option<StyleValue>

Source

pub fn clear_overrides(&self)

Source

pub fn overridden_nodes(&self) -> HashSet<InspectNodeId>

Nodes with edited or disabled properties; allows hosts to retain untouched subtrees.

Source

pub fn clear_property_override( &self, node: InspectNodeId, property: StyleProperty, )

Restore the authored value and enabled state of a single property.

Source

pub fn trace_json(&self) -> Result<String, TraceError>

Source

pub fn import_trace_json(&self, json: &str) -> Result<(), TraceError>

Trait Implementations§

Source§

impl Clone for InspectorHandle

Source§

fn clone(&self) -> InspectorHandle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InspectorHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InspectorHandle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.