pub struct VQName(/* private fields */);Expand description
A qualified name consisting of an optional namespace and a local name.
VQName is used for XML namespace support, where elements and attributes
can have qualified names like {http://example.com}element.
Both the namespace and local name are stored as Values, allowing them
to benefit from inline string optimization for short names.
Implementations§
Source§impl VQName
impl VQName
Sourcepub fn new(namespace: impl Into<Value>, local_name: impl Into<Value>) -> Self
pub fn new(namespace: impl Into<Value>, local_name: impl Into<Value>) -> Self
Creates a new qualified name with a namespace and local name.
Sourcepub fn new_local(local_name: impl Into<Value>) -> Self
pub fn new_local(local_name: impl Into<Value>) -> Self
Creates a new qualified name without a namespace.
Sourcepub fn namespace(&self) -> Option<&Value>
pub fn namespace(&self) -> Option<&Value>
Returns the namespace, or None if there is no namespace.
Sourcepub fn local_name(&self) -> &Value
pub fn local_name(&self) -> &Value
Returns the local name.
Sourcepub fn has_namespace(&self) -> bool
pub fn has_namespace(&self) -> bool
Returns true if this qualified name has a namespace.
Trait Implementations§
impl Eq for VQName
Auto Trait Implementations§
impl Freeze for VQName
impl RefUnwindSafe for VQName
impl Send for VQName
impl Sync for VQName
impl Unpin for VQName
impl UnwindSafe for VQName
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> 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.