Struct xml::name::OwnedName[][src]

pub struct OwnedName {
    pub local_name: String,
    pub namespace: Option<String>,
    pub prefix: Option<String>,
}
Expand description

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

Constructs a borrowed Name based on this owned name.

Returns a new OwnedName instance representing a plain local name.

Returns a new OwnedName instance representing a qualified name with or without a prefix and with a namespace URI.

Returns an optional prefix by reference, equivalent to self.borrow().prefix but avoids extra work.

Returns an optional namespace by reference, equivalen to self.borrow().namespace but avoids extra work.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Parses the given string slice into a qualified name.

This function, when finishes sucessfully, always return a qualified name without a namespace (name.namespace == None). It should be filled later using proper NamespaceStack.

It is supposed that all characters in the argument string are correct as defined by the XML specification. No additional checks except a check for emptiness are done.

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.