pub struct Element {
pub id: u32,
pub name: String,
pub attrs: Vec<Attr>,
pub children: Vec<Child>,
pub pos: Pos,
}Expand description
An element: <Name attr={…}>children</Name>, or one that closes itself.
Fields§
§id: u32The element’s id, unique in its file and kept across edits: numbered
in order by parse, matched against the last parse by
crate::ids::matched.
name: StringIts tag name: a built-in like Frame or Text, or an import’s name.
attrs: Vec<Attr>Its attributes, in the order written.
children: Vec<Child>What it holds, in order: elements and runs of text.
pos: PosWhere its < is.
Trait Implementations§
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Forget for Element
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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