pub struct Placed {
pub id: NodeId,
pub parent: Option<NodeId>,
pub kind: &'static str,
pub name: Option<String>,
pub path: Vec<usize>,
}Expand description
One node the form put in the tree, and where in the file it came from.
A designer needs both halves: the NodeId to hit-test and draw a selection
around, and the path to edit when the selection moves. The
path is a list of child indices from the form node down, which is stable
across a rebuild in a way a byte offset is not — every edit shifts the offsets
after it, and the whole point is to edit and carry on.
Fields§
§id: NodeIdThe node in the tree.
parent: Option<NodeId>Its parent in the tree, or None for a node directly under the form.
kind: &'static strWhat kind of widget it is.
name: Option<String>The name the file gave it, if it gave one.
path: Vec<usize>Child indices from the form node’s children down to this node.
Trait Implementations§
impl Eq for Placed
impl StructuralPartialEq for Placed
Auto Trait Implementations§
impl Freeze for Placed
impl RefUnwindSafe for Placed
impl Send for Placed
impl Sync for Placed
impl Unpin for Placed
impl UnsafeUnpin for Placed
impl UnwindSafe for Placed
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