pub struct DocumentView<'a> { /* private fields */ }Expand description
Borrowed semantic view of one immutable XmlDocument generation.
Implementations§
Source§impl<'a> DocumentView<'a>
impl<'a> DocumentView<'a>
Sourcepub const fn identity(self) -> DocumentIdentity
pub const fn identity(self) -> DocumentIdentity
Return the owning document identity.
Sourcepub const fn generation(self) -> u64
pub const fn generation(self) -> u64
Return the immutable generation represented by this view.
Sourcepub fn root(self) -> NodeIdentity
pub fn root(self) -> NodeIdentity
Return the document root identity.
Sourcepub fn root_element(self) -> NodeIdentity
pub fn root_element(self) -> NodeIdentity
Return the root element identity.
Sourcepub fn node_count(self) -> usize
pub fn node_count(self) -> usize
Return the number of parser nodes in this generation.
Sourcepub fn node_for_id(
self,
value: &str,
registrations: &[IdAttributeRegistration],
) -> Option<NodeIdentity>
pub fn node_for_id( self, value: &str, registrations: &[IdAttributeRegistration], ) -> Option<NodeIdentity>
Resolve an ID using standard spellings plus caller registrations.
Sourcepub fn document_order(
self,
identity: NodeIdentity,
) -> Result<usize, XmlDocumentError>
pub fn document_order( self, identity: NodeIdentity, ) -> Result<usize, XmlDocumentError>
Return deterministic document order for a current tree-node identity.
Sourcepub fn node_order(
self,
identity: NodeIdentity,
) -> Result<SemanticOrder, XmlDocumentError>
pub fn node_order( self, identity: NodeIdentity, ) -> Result<SemanticOrder, XmlDocumentError>
Return a total order key for a current tree node.
Sourcepub fn attribute_order(
self,
identity: &AttributeIdentity,
) -> Result<SemanticOrder, XmlDocumentError>
pub fn attribute_order( self, identity: &AttributeIdentity, ) -> Result<SemanticOrder, XmlDocumentError>
Return a total order key for a current attribute node.
Sourcepub fn namespace_order(
self,
identity: &NamespaceIdentity,
) -> Result<SemanticOrder, XmlDocumentError>
pub fn namespace_order( self, identity: &NamespaceIdentity, ) -> Result<SemanticOrder, XmlDocumentError>
Return a total order key for a current namespace node.
Sourcepub fn attribute_identity(
self,
owner: NodeIdentity,
namespace: Option<&str>,
local_name: &str,
) -> Result<AttributeIdentity, XmlDocumentError>
pub fn attribute_identity( self, owner: NodeIdentity, namespace: Option<&str>, local_name: &str, ) -> Result<AttributeIdentity, XmlDocumentError>
Identify an attribute by expanded name on a current owner element.
Sourcepub fn namespace_identities(
self,
owner: NodeIdentity,
) -> Result<Vec<NamespaceIdentity>, XmlDocumentError>
pub fn namespace_identities( self, owner: NodeIdentity, ) -> Result<Vec<NamespaceIdentity>, XmlDocumentError>
Return the in-scope XPath namespace nodes owned by one current element.
Trait Implementations§
Source§impl<'a> Clone for DocumentView<'a>
impl<'a> Clone for DocumentView<'a>
Source§fn clone(&self) -> DocumentView<'a>
fn clone(&self) -> DocumentView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for DocumentView<'a>
Auto Trait Implementations§
impl<'a> Freeze for DocumentView<'a>
impl<'a> RefUnwindSafe for DocumentView<'a>
impl<'a> Send for DocumentView<'a>
impl<'a> Sync for DocumentView<'a>
impl<'a> Unpin for DocumentView<'a>
impl<'a> UnsafeUnpin for DocumentView<'a>
impl<'a> UnwindSafe for DocumentView<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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