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 Elementwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attr>: Freeze,
PhantomData<Child>: Freeze,
impl Move for Element
impl RefUnwindSafe for Element
impl Send for Elementwhere
RawVecInner: Send,
impl Sync for Elementwhere
RawVecInner: Sync,
impl Unpin for Element
impl UnsafeUnpin for Elementwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attr>: UnsafeUnpin,
PhantomData<Child>: UnsafeUnpin,
impl UnwindSafe for Elementwhere
RawVecInner: UnwindSafe,
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