Type Alias libdav::PropertyName

source ·
pub type PropertyName<'ns, 'name> = ExpandedName<'ns, 'name>;
Expand description

A WebDav property with a namespace and name.

This is currently an alias of roxmltree::ExpandedName.

Aliased Type§

struct PropertyName<'ns, 'name> { /* private fields */ }

Implementations

source§

impl<'a, 'b> ExpandedName<'a, 'b>

source

pub fn namespace(&self) -> Option<&'a str>

Returns a namespace URI.

§Examples
let doc = roxmltree::Document::parse("<e xmlns='http://www.w3.org'/>").unwrap();

assert_eq!(doc.root_element().tag_name().namespace(), Some("http://www.w3.org"));
source

pub fn name(&self) -> &'b str

Returns a local name.

§Examples
let doc = roxmltree::Document::parse("<e/>").unwrap();

assert_eq!(doc.root_element().tag_name().name(), "e");
source§

impl ExpandedName<'static, 'static>

source

pub const fn from_static( uri: &'static str, name: &'static str, ) -> ExpandedName<'static, 'static>

Create a new instance from static data.

§Example
use roxmltree::ExpandedName;
const DAV_HREF: ExpandedName =
    ExpandedName::from_static("urn:ietf:params:xml:ns:caldav:", "calendar-data");

Trait Implementations

source§

impl<'a, 'b> Clone for ExpandedName<'a, 'b>

source§

fn clone(&self) -> ExpandedName<'a, 'b>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExpandedName<'_, '_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a, 'b> From<&'b str> for ExpandedName<'a, 'b>

source§

fn from(v: &'b str) -> ExpandedName<'a, 'b>

Converts to this type from the input type.
source§

impl<'a, 'b> From<(&'a str, &'b str)> for ExpandedName<'a, 'b>

source§

fn from(v: (&'a str, &'b str)) -> ExpandedName<'a, 'b>

Converts to this type from the input type.
source§

impl<'a, 'b> PartialEq for ExpandedName<'a, 'b>

source§

fn eq(&self, other: &ExpandedName<'a, 'b>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, 'b> Copy for ExpandedName<'a, 'b>

source§

impl<'a, 'b> Eq for ExpandedName<'a, 'b>

source§

impl<'a, 'b> StructuralPartialEq for ExpandedName<'a, 'b>