Struct xml::name::OwnedName [−][src]
pub struct OwnedName { pub local_name: String, pub namespace: Option<String>, pub prefix: Option<String>, }
An owned variant of Name
.
Everything about Name
applies to this structure as well.
Fields
local_name: String
A local name, e.g. string
in xsi:string
.
namespace: Option<String>
A namespace URI, e.g. http://www.w3.org/2000/xmlns/
.
prefix: Option<String>
A name prefix, e.g. xsi
in xsi:string
.
Implementations
impl OwnedName
[src][−]
pub fn borrow(&self) -> Name<'_>
[src][−]
Constructs a borrowed Name
based on this owned name.
pub fn local<S>(local_name: S) -> OwnedName where
S: Into<String>,
[src][−]
S: Into<String>,
Returns a new OwnedName
instance representing a plain local name.
pub fn qualified<S1, S2, S3>(
local_name: S1,
namespace: S2,
prefix: Option<S3>
) -> OwnedName where
S1: Into<String>,
S2: Into<String>,
S3: Into<String>,
[src][−]
local_name: S1,
namespace: S2,
prefix: Option<S3>
) -> OwnedName where
S1: Into<String>,
S2: Into<String>,
S3: Into<String>,
Returns a new OwnedName
instance representing a qualified name with or without
a prefix and with a namespace URI.
pub fn prefix_ref(&self) -> Option<&str>
[src][−]
Returns an optional prefix by reference, equivalent to self.borrow().prefix
but avoids extra work.
pub fn namespace_ref(&self) -> Option<&str>
[src][−]
Returns an optional namespace by reference, equivalen to self.borrow().namespace
but avoids extra work.
Trait Implementations
impl Clone for OwnedName
[src][+]
impl Debug for OwnedName
[src][+]
impl Display for OwnedName
[src][+]
impl Eq for OwnedName
[src]
impl<'a> From<Name<'a>> for OwnedName
[src][+]
impl FromStr for OwnedName
[src][+]
impl Hash for OwnedName
[src][+]
impl PartialEq<OwnedName> for OwnedName
[src][+]
impl StructuralEq for OwnedName
[src]
impl StructuralPartialEq for OwnedName
[src]
Auto Trait Implementations
impl RefUnwindSafe for OwnedName
impl Send for OwnedName
impl Sync for OwnedName
impl Unpin for OwnedName
impl UnwindSafe for OwnedName
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,