pub struct Target {
pub tree_kind: TreeKind,
/* private fields */
}Fields§
§tree_kind: TreeKindThe tree of the snapshots: visual or logical.
Implementations§
Source§impl Target
impl Target
pub fn with_inspector( inspector: Rc<RefCell<Inspector>>, root: &Ref<TopLevel>, ) -> Self
pub fn root(&self) -> InspectResult<Ref<TopLevel>>
pub fn id_for(&mut self, element: &Ref<StyledElement>) -> NodeId
pub fn snapshot(&mut self) -> InspectResult<Vec<Node>>
Sourcepub fn element(&mut self, id: NodeId) -> InspectResult<Ref<StyledElement>>
pub fn element(&mut self, id: NodeId) -> InspectResult<Ref<StyledElement>>
The element of a node of the current tree.
Sourcepub fn query(
&mut self,
scope: Option<NodeId>,
query: &str,
) -> InspectResult<Vec<NodeId>>
pub fn query( &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).
pub fn properties(&mut self, id: NodeId) -> InspectResult<Vec<Property>>
Sourcepub fn set_attribute(
&mut self,
id: NodeId,
name: &str,
value: &str,
) -> InspectResult<()>
pub fn set_attribute( &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.
Sourcepub fn matched_styles(&mut self, id: NodeId) -> InspectResult<Vec<MatchedStyle>>
pub fn matched_styles(&mut self, id: NodeId) -> InspectResult<Vec<MatchedStyle>>
The active frames that apply to the node, with their setters.
pub fn box_model(&mut self, id: NodeId) -> InspectResult<BoxModel>
Sourcepub fn bounds(&self) -> InspectResult<Rect>
pub fn bounds(&self) -> InspectResult<Rect>
The bounds of the top level, from its origin.
Sourcepub fn screenshot(&self) -> InspectResult<Vec<u8>>
pub fn screenshot(&self) -> InspectResult<Vec<u8>>
A PNG of the whole top level.
pub fn hide_highlight(&mut self)
pub fn highlight(&mut self, id: NodeId) -> InspectResult<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Target
impl !Send for Target
impl !Sync for Target
impl !UnwindSafe for Target
impl Freeze for Target
impl Unpin for Target
impl UnsafeUnpin for Target
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more