pub enum Component<'a> {
AtomicTag(&'static AtomicTag),
Element(&'a Element),
}Expand description
This struct is created by State::get_component. See its documentation for more.
Variants§
AtomicTag(&'static AtomicTag)
A built-in MXP tag.
Element(&'a Element)
A user-defined custom tag element.
Implementations§
Source§impl Component<'_>
impl Component<'_>
Sourcepub const fn name(&self) -> &str
pub const fn name(&self) -> &str
Returns the name of the component.
For example, the name of <SOUND "ouch.wav"> is "SOUND".
Sourcepub const fn is_command(&self) -> bool
pub const fn is_command(&self) -> bool
Returns true if the element has no closing tag, e.g. <BR>.
Trait Implementations§
impl<'a> Copy for Component<'a>
Auto Trait Implementations§
impl<'a> Freeze for Component<'a>
impl<'a> RefUnwindSafe for Component<'a>
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> UnsafeUnpin for Component<'a>
impl<'a> UnwindSafe for Component<'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