Struct markup5ever::interface::QualName
[−]
[src]
pub struct QualName {
pub prefix: Option<Prefix>,
pub ns: Namespace,
pub local: LocalName,
}A name with a namespace. Fully qualified name. Used to depict names of tags and attributes.
Used to differentiate between similar XML fragments. For example:
// HTML <table> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> // Furniture XML <table> <name>African Coffee Table</name> <width>80</width> <length>120</length> </table>
Without XML namespaces, we can't use those two fragments in the same document at the same time. However if we declare a namespace we could instead say:
// Furniture XML <furn:table> <furn:name>African Coffee Table</furn:name> <furn:width>80</furn:width> <furn:length>120</furn:length> </furn:table>
and bind it to a different name.
For this reason we parse names that contain a colon in the following way:
<furn:table> | | | +- local name | prefix (when resolved gives namespace_url)
Fields
prefix: Option<Prefix>
ns: Namespace
local: LocalName
Methods
impl QualName[src]
fn new(prefix: Option<Prefix>, ns: Namespace, local: LocalName) -> QualName
fn expanded(&self) -> ExpandedName
Trait Implementations
impl PartialEq for QualName[src]
fn eq(&self, __arg_0: &QualName) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &QualName) -> bool
This method tests for !=.
impl Eq for QualName[src]
impl PartialOrd for QualName[src]
fn partial_cmp(&self, __arg_0: &QualName) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &QualName) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &QualName) -> bool
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &QualName) -> bool
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &QualName) -> bool
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for QualName[src]
fn cmp(&self, __arg_0: &QualName) -> Ordering
This method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self
ord_max_min)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min)Compares and returns the minimum of two values. Read more
impl Hash for QualName[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for QualName[src]
impl Clone for QualName[src]
fn clone(&self) -> QualName
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more