pub struct StartElement<'r, 'a> { /* private fields */ }Expand description
The start of an element.
Implementations§
Source§impl<'r, 'a> StartElement<'r, 'a>
impl<'r, 'a> StartElement<'r, 'a>
Sourcepub fn attributes(
&self,
) -> impl ExactSizeIterator<Item = Attribute<'r, 'a>> + use<'r, 'a>
pub fn attributes( &self, ) -> impl ExactSizeIterator<Item = Attribute<'r, 'a>> + use<'r, 'a>
The attributes, in document order (namespace declarations excluded).
Sourcepub fn attribute(
&self,
namespace: Option<&str>,
local: &str,
) -> Option<&'r Cow<'a, str>>
pub fn attribute( &self, namespace: Option<&str>, local: &str, ) -> Option<&'r Cow<'a, str>>
The value of the attribute with this namespace (None for none) and local name.
Sourcepub fn namespace_declarations(
&self,
) -> impl ExactSizeIterator<Item = (&'a str, &'r str)> + use<'r, 'a>
pub fn namespace_declarations( &self, ) -> impl ExactSizeIterator<Item = (&'a str, &'r str)> + use<'r, 'a>
The namespace declarations of the element, in document order: the prefix (""
for the default namespace) and the namespace name (empty when the default
namespace is undeclared). A declaration of the xml prefix is not reported.
Sourcepub fn lookup_namespace(&self, prefix: &str) -> Option<&'r str>
pub fn lookup_namespace(&self, prefix: &str) -> Option<&'r str>
The namespace bound to prefix in the scope of the element (see
Reader::lookup_namespace).
Trait Implementations§
Source§impl<'r, 'a> Clone for StartElement<'r, 'a>
impl<'r, 'a> Clone for StartElement<'r, 'a>
impl<'r, 'a> Copy for StartElement<'r, 'a>
Auto Trait Implementations§
impl<'r, 'a> Forget for StartElement<'r, 'a>
impl<'r, 'a> Freeze for StartElement<'r, 'a>
impl<'r, 'a> RefUnwindSafe for StartElement<'r, 'a>
impl<'r, 'a> Send for StartElement<'r, 'a>
impl<'r, 'a> Sync for StartElement<'r, 'a>
impl<'r, 'a> Unpin for StartElement<'r, 'a>
impl<'r, 'a> UnsafeUnpin for StartElement<'r, 'a>
impl<'r, 'a> UnwindSafe for StartElement<'r, '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