pub struct StartEvent<'a> { /* private fields */ }Expand description
An event emitted by start tags like <hello name="value"> or empty tags like
<hello name="value"/>.
Implementations§
Source§impl<'a> StartEvent<'a>
impl<'a> StartEvent<'a>
Sourcepub fn prefix(&self) -> Option<&'a str>
pub fn prefix(&self) -> Option<&'a str>
Returns the prefix component of this event’s prefixed name, if present.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this event is an empty tag.
§Notes
This method is not suitable for checking whether the content of this element is empty, it only checks whether the tag itself is of the self-closing variety.
Sourcepub fn position_in(&self, reader: &Reader<'_>) -> Range<usize>
pub fn position_in(&self, reader: &Reader<'_>) -> Range<usize>
Sourcepub fn name_position_in(&self, reader: &Reader<'_>) -> Range<usize>
pub fn name_position_in(&self, reader: &Reader<'_>) -> Range<usize>
Sourcepub fn prefixed_name_position_in(&self, reader: &Reader<'_>) -> Range<usize>
pub fn prefixed_name_position_in(&self, reader: &Reader<'_>) -> Range<usize>
Sourcepub fn attributes(&self) -> Attributes<'a> ⓘ
pub fn attributes(&self) -> Attributes<'a> ⓘ
Returns an iterator over the attribute events of this start tag.
Trait Implementations§
Source§impl<'a> Clone for StartEvent<'a>
impl<'a> Clone for StartEvent<'a>
Source§fn clone(&self) -> StartEvent<'a>
fn clone(&self) -> StartEvent<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for StartEvent<'a>
impl<'a> Debug for StartEvent<'a>
impl<'a> Copy for StartEvent<'a>
Auto Trait Implementations§
impl<'a> Freeze for StartEvent<'a>
impl<'a> RefUnwindSafe for StartEvent<'a>
impl<'a> Send for StartEvent<'a>
impl<'a> Sync for StartEvent<'a>
impl<'a> Unpin for StartEvent<'a>
impl<'a> UnwindSafe for StartEvent<'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