FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Target

    struct · ferroui-inspect · v0.5.0

    struct Target
    

    View source

    Members

    tree_kind

    tree_kind: crate::TreeKind
    

    The tree of the snapshots: visual or logical.

    Source

    new

    fn new(root: &Ref<TopLevel>) -> Self
    

    A target on the shared inspector of this thread.

    Source

    with_inspector

    fn with_inspector(inspector: Rc<RefCell<Inspector>>, root: &Ref<TopLevel>) -> Self
    

    Source

    root

    fn root(self: &Self) -> InspectResult<Ref<TopLevel>>
    

    Source

    id_for

    fn id_for(self: &mut Self, element: &Ref<StyledElement>) -> NodeId
    

    Source

    snapshot

    fn snapshot(self: &mut Self) -> InspectResult<Vec<Node>>
    

    Source

    element

    fn element(self: &mut Self, id: NodeId) -> InspectResult<Ref<StyledElement>>
    

    The element of a node of the current tree.

    Source

    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).

    Source

    properties

    fn properties(self: &mut Self, id: NodeId) -> InspectResult<Vec<Property>>
    

    Source

    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.

    Source

    matched_styles

    fn matched_styles(self: &mut Self, id: NodeId) -> InspectResult<Vec<MatchedStyle>>
    

    The active frames that apply to the node, with their setters.

    Source

    box_model

    fn box_model(self: &mut Self, id: NodeId) -> InspectResult<BoxModel>
    

    Source

    bounds

    fn bounds(self: &Self) -> InspectResult<Rect>
    

    The bounds of the top level, from its origin.

    Source

    screenshot

    fn screenshot(self: &Self) -> InspectResult<Vec<u8>>
    

    A PNG of the whole top level.

    Source

    hide_highlight

    fn hide_highlight(self: &mut Self)
    

    Source

    highlight

    fn highlight(self: &mut Self, id: NodeId) -> InspectResult<()>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.