pub struct Prefix<'a>(/* private fields */);Expand description
§XML Prefix
A namespace Prefix used to map a LocalName to a XmlNamespace within an XML document.
Implementations§
Source§impl<'a> Prefix<'a>
impl<'a> Prefix<'a>
Sourcepub fn new<T: Into<Cow<'a, str>>>(value: T) -> Result<Self, PrefixParseError>
pub fn new<T: Into<Cow<'a, str>>>(value: T) -> Result<Self, PrefixParseError>
Creates a new Prefix from a string.
Sourcepub const fn new_dangerous(value: &'a str) -> Result<Self, PrefixParseError>
pub const fn new_dangerous(value: &'a str) -> Result<Self, PrefixParseError>
Sourcepub fn into_owned(self) -> Prefix<'static>
pub fn into_owned(self) -> Prefix<'static>
Converts this Prefix into an owned version.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true if this Prefix is the default prefix.
Trait Implementations§
Source§impl<'a> Ord for Prefix<'a>
impl<'a> Ord for Prefix<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for Prefix<'a>
impl<'a> PartialOrd for Prefix<'a>
impl<'a> Eq for Prefix<'a>
impl<'a> StructuralPartialEq for Prefix<'a>
Auto Trait Implementations§
impl<'a> Freeze for Prefix<'a>
impl<'a> RefUnwindSafe for Prefix<'a>
impl<'a> Send for Prefix<'a>
impl<'a> Sync for Prefix<'a>
impl<'a> Unpin for Prefix<'a>
impl<'a> UnwindSafe for Prefix<'a>
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