pub struct Namespace { /* private fields */ }Expand description
Represents an XML namespace with prefix and URI.
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn new(prefix: impl Into<String>, uri: impl Into<String>) -> Self
pub fn new(prefix: impl Into<String>, uri: impl Into<String>) -> Self
Creates a new namespace with prefix and URI.
Sourcepub fn default_ns(uri: impl Into<String>) -> Self
pub fn default_ns(uri: impl Into<String>) -> Self
Creates a default namespace (no prefix).
Sourcepub fn get_prefix(&self) -> &str
pub fn get_prefix(&self) -> &str
Alias for uri() to match libxml API.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true if this is the default namespace.
Trait Implementations§
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnsafeUnpin for Namespace
impl UnwindSafe for Namespace
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.