Target
struct · ferroui-inspect · v0.5.0
struct Target
Members
tree_kindnewwith_inspectorrootid_forsnapshotelementquerypropertiesset_attributematched_stylesbox_modelboundsscreenshothide_highlighthighlight
tree_kind
tree_kind: crate::TreeKind
The tree of the snapshots: visual or logical.
new
fn new(root: &Ref<TopLevel>) -> Self
A target on the shared inspector of this thread.
with_inspector
fn with_inspector(inspector: Rc<RefCell<Inspector>>, root: &Ref<TopLevel>) -> Self
root
fn root(self: &Self) -> InspectResult<Ref<TopLevel>>
id_for
fn id_for(self: &mut Self, element: &Ref<StyledElement>) -> NodeId
snapshot
fn snapshot(self: &mut Self) -> InspectResult<Vec<Node>>
element
fn element(self: &mut Self, id: NodeId) -> InspectResult<Ref<StyledElement>>
The element of a node of the current tree.
query
fn query(self: &mut Self, scope: Option<NodeId>, query: &str) -> InspectResult<Vec<NodeId>>
The nodes below scope (the whole tree without one) that match the selector, in document
order. Uses the framework's selector syntax and matching rules (including logical ancestry).
properties
fn properties(self: &mut Self, id: NodeId) -> InspectResult<Vec<Property>>
set_attribute
fn set_attribute(self: &mut Self, id: NodeId, name: &str, value: &str) -> InspectResult<()>
class replaces the classes (not the pseudo-classes); any other name sets the local value
of a property from text. The name of an element cannot change after it has been styled.
matched_styles
fn matched_styles(self: &mut Self, id: NodeId) -> InspectResult<Vec<MatchedStyle>>
The active frames that apply to the node, with their setters.
box_model
fn box_model(self: &mut Self, id: NodeId) -> InspectResult<BoxModel>
bounds
fn bounds(self: &Self) -> InspectResult<Rect>
The bounds of the top level, from its origin.
screenshot
fn screenshot(self: &Self) -> InspectResult<Vec<u8>>
A PNG of the whole top level.
hide_highlight
fn hide_highlight(self: &mut Self)
highlight
fn highlight(self: &mut Self, id: NodeId) -> InspectResult<()>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.