pub struct Document {
pub uri: Atom,
pub has_doctype: bool,
pub xml_version: Atom,
pub encoding: Atom,
/* private fields */
}Expand description
Immutable parsed document.
Fields§
§uri: Atom§has_doctype: boolInternal general entities declared in the DOCTYPE, if any.
xml_version: Atom§encoding: AtomImplementations§
Source§impl Document
impl Document
pub fn root(&self) -> Node<'_>
Sourcepub fn document_element(&self) -> Option<Node<'_>>
pub fn document_element(&self) -> Option<Node<'_>>
The document element.
pub fn node(&self, id: NodeId) -> Node<'_>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Forget for Document
impl Freeze for Documentwhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<NodeData>: Freeze,
PhantomData<Attribute>: Freeze,
PhantomData<(Arc<str>, Arc<str>)>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<(Arc<str>, NodeId)>: Freeze,
impl Move for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Documentwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<NodeData>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
PhantomData<(Arc<str>, Arc<str>)>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<(Arc<str>, NodeId)>: UnsafeUnpin,
impl UnwindSafe for Document
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