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 | A local name, e.g. |
namespace | A namespace URI, e.g. |
prefix | A name prefix, e.g. |
Methods
impl OwnedName
fn borrow(&self) -> Name
Constructs a borrowed Name
based on this owned name.
fn local<'s, S: Into<Cow<'s, str>>>(local_name: S) -> OwnedName
Returns a new OwnedName
instance representing a plain local name.
fn qualified<'s1, 's2, 's3, S1, S2, S3>(local_name: S1, namespace: S2, prefix: Option<S3>) -> OwnedName where S1: Into<Cow<'s1, str>>, S2: Into<Cow<'s2, str>>, S3: Into<Cow<'s3, str>>
Returns a new OwnedName
instance representing a qualified name with or without
a prefix and with a namespace URI.
fn prefix_as_ref(&self) -> Option<&str>
Returns an optional prefix by reference, equivalent to self.borrow().prefix
but avoids extra work.
fn namespace_as_ref(&self) -> Option<&str>
Returns an optional namespace by reference, equivalen to self.borrow().namespace
but avoids extra work.
fn to_repr(&self) -> String
See Name::to_repr()
for details.