pub struct TagName<'types> {
pub name: String,
pub module: Option<&'types ModuleMeta>,
}
Expand description
Represents the name of a XML tag including an optional namespace prefix.
Fields§
§name: String
Name of the XML tag.
module: Option<&'types ModuleMeta>
Module the tag belongs to.
Implementations§
Source§impl<'types> TagName<'types>
impl<'types> TagName<'types>
Sourcepub fn new(
types: &'types MetaTypes,
ident: &Ident,
form: FormChoiceType,
) -> Self
pub fn new( types: &'types MetaTypes, ident: &Ident, form: FormChoiceType, ) -> Self
Sourcepub fn get(&self, with_prefix: bool) -> String
pub fn get(&self, with_prefix: bool) -> String
Get the resolved name of the the XML tag
The with_prefix
parameter tells whether the namespace prefix should be added to tag or not.
Sourcepub fn get_for_default_namespace(&self, ns: &Option<Namespace>) -> String
pub fn get_for_default_namespace(&self, ns: &Option<Namespace>) -> String
Get the resolved name of the the XML tag for the specified default namespace.
Trait Implementations§
Auto Trait Implementations§
impl<'types> Freeze for TagName<'types>
impl<'types> RefUnwindSafe for TagName<'types>
impl<'types> Send for TagName<'types>
impl<'types> Sync for TagName<'types>
impl<'types> Unpin for TagName<'types>
impl<'types> UnwindSafe for TagName<'types>
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