pub enum DomNode {
Document(DomDocument),
DocumentType(DomDocType),
EmptyElement(DomEmptyElem),
Element(DomElem),
Text(String),
}
Expand description
Node types
§Macros
Each variant can be created by the corresponding macro.
Document
:domdoc!
DocumentType
:doctype!
EmptyElement
:empty!
Element
:elem!
,end_elem!
Text
:domtxt!
Variants§
Document(DomDocument)
DocumentType(DomDocType)
EmptyElement(DomEmptyElem)
Element(DomElem)
Text(String)
Implementations§
Source§impl DomNode
impl DomNode
pub fn as_doc(&self) -> Option<&DomDocument>
pub fn as_doc_mut(&mut self) -> Option<&mut DomDocument>
pub fn as_doctype(&self) -> Option<&DomDocType>
pub fn as_doctype_mut(&mut self) -> Option<&mut DomDocType>
pub fn as_empty(&self) -> Option<&DomEmptyElem>
pub fn as_empty_mut(&mut self) -> Option<&mut DomEmptyElem>
pub fn as_elem(&self) -> Option<&DomElem>
pub fn as_elem_mut(&mut self) -> Option<&mut DomElem>
pub fn as_text(&self) -> Option<&String>
pub fn as_text_mut(&mut self) -> Option<&mut String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DomNode
impl RefUnwindSafe for DomNode
impl Send for DomNode
impl Sync for DomNode
impl Unpin for DomNode
impl UnwindSafe for DomNode
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