pub struct Doc<'a> { /* private fields */ }Expand description
The document a query runs over: its tree, the tree’s index, and for an XML document its namespaces.
Implementations§
Source§impl<'a> Doc<'a>
impl<'a> Doc<'a>
Sourcepub fn html(tree: &'a Document, index: &'a Index) -> Doc<'a>
pub fn html(tree: &'a Document, index: &'a Index) -> Doc<'a>
An HTML document. index must be of tree as it is now.
Sourcepub fn xml(
tree: &'a Document,
index: &'a Index,
names: &'a dyn Namespaces,
) -> Doc<'a>
pub fn xml( tree: &'a Document, index: &'a Index, names: &'a dyn Namespaces, ) -> Doc<'a>
An XML document, whose elements are parsec::Ns::Xml and
whose attributes’ namespaces are parsec::AttrNs::Host ids.
pub fn tree(&self) -> &'a Document
pub fn is_xml(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Doc<'a>
impl<'a> !UnwindSafe for Doc<'a>
impl<'a> Forget for Doc<'a>
impl<'a> Freeze for Doc<'a>
impl<'a> Move for Doc<'a>
impl<'a> Send for Doc<'a>
impl<'a> Sync for Doc<'a>
impl<'a> Unpin for Doc<'a>
impl<'a> UnsafeUnpin for Doc<'a>
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