pub struct QName {
pub local_name: String,
pub namespace_uri: Option<String>,
pub prefix: Option<String>,
}
Expand description
Qualified Name (QName) representing a namespace-qualified XML name
Fields§
§local_name: String
Local name part
namespace_uri: Option<String>
Namespace URI (empty string for default namespace, None for no namespace)
prefix: Option<String>
Namespace prefix (empty string for default namespace, None for no prefix)
Implementations§
Source§impl QName
impl QName
Sourcepub fn with_namespace(
local_name: impl Into<String>,
namespace_uri: impl Into<String>,
) -> Self
pub fn with_namespace( local_name: impl Into<String>, namespace_uri: impl Into<String>, ) -> Self
Create a new QName with namespace URI
Sourcepub fn with_prefix_and_namespace(
local_name: impl Into<String>,
prefix: impl Into<String>,
namespace_uri: impl Into<String>,
) -> Self
pub fn with_prefix_and_namespace( local_name: impl Into<String>, prefix: impl Into<String>, namespace_uri: impl Into<String>, ) -> Self
Create a new QName with prefix and namespace URI
Sourcepub fn to_xml_name(&self) -> String
pub fn to_xml_name(&self) -> String
Get the qualified name as it would appear in XML
Sourcepub fn is_namespace_declaration(&self) -> bool
pub fn is_namespace_declaration(&self) -> bool
Check if this is a namespace declaration attribute
Sourcepub fn is_ddex_standard(&self) -> bool
pub fn is_ddex_standard(&self) -> bool
Check if this is a standard DDEX attribute
Sourcepub fn canonical_sort_key(&self) -> String
pub fn canonical_sort_key(&self) -> String
Get the sorting key for canonical ordering
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QName
impl<'de> Deserialize<'de> for QName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for QName
impl Ord for QName
Source§impl PartialOrd for QName
impl PartialOrd for QName
impl Eq for QName
impl StructuralPartialEq for QName
Auto Trait Implementations§
impl Freeze for QName
impl RefUnwindSafe for QName
impl Send for QName
impl Sync for QName
impl Unpin for QName
impl UnwindSafe for QName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.