Struct Qname

Source
pub struct Qname(/* private fields */);
Expand description

String slice for QName.

Implementations§

Source§

impl Qname

Source

pub fn from_str(s: &str) -> Result<&Self, NameError>

Creates a new &Qname.

§Failures

Fails if the given string is not a valid QName.

§Examples
let noprefix = Qname::from_str("hello")?;
assert_eq!(noprefix, "hello");

let prefixed = Qname::from_str("foo:bar")?;
assert_eq!(prefixed, "foo:bar");

assert!(Qname::from_str("").is_err(), "Empty string is not a QName");
assert!(Qname::from_str("foo bar").is_err(), "Whitespace is not allowed");
assert!(Qname::from_str("foo:bar:baz").is_err(), "Two or more colons are not allowed");
assert!(Qname::from_str("0foo").is_err(), "ASCII digit at the beginning is not allowed");
Source

pub unsafe fn new_unchecked(s: &str) -> &Self

Creates a new &Qname without validation.

§Safety

The given string should be a valid QName.

§Examples
let name = unsafe {
    Qname::new_unchecked("foo:bar")
};
assert_eq!(name, "foo:bar");
Source

pub fn as_str(&self) -> &str

Returns the string as &str.

§Examples
let name = Qname::from_str("foo:bar")?;
assert_eq!(name, "foo:bar");

let s: &str = name.as_str();
assert_eq!(s, "foo:bar");
Source

pub fn len(&self) -> usize

Returns the length of the string in bytes.

§Examples
let name = Qname::from_str("foo:bar")?;
assert_eq!(name.len(), 7);
Source

pub fn parse_next(s: &str) -> Result<(&Self, &str), NameError>

Parses the leading Qname and returns the value and the rest input.

§Exmaples
let input = "hello:012";
let expected = Qname::from_str("hello").expect("valid Qname");
assert_eq!(
    Qname::parse_next(input),
    Ok((expected, ":012"))
);
let input = "hello:world:foo";
let expected = Qname::from_str("hello:world").expect("valid Qname");
assert_eq!(
    Qname::parse_next(input),
    Ok((expected, ":foo"))
);
let input = "012";
assert!(Qname::parse_next(input).is_err());
Source

pub fn has_prefix(&self) -> bool

Returns whether the QName has a prefix.

Note that this is O(length) operation. Consider using ParsedQname::has_prefix method if possible.

§Examples
let local_only = Qname::from_str("hello")?;
assert!(!local_only.has_prefix());

let prefixed = Qname::from_str("foo:bar")?;
assert!(prefixed.has_prefix());
Source

pub fn prefix(&self) -> Option<&Ncname>

Returns the prefix if available.

Note that this is O(length) operation. Consider using ParsedQname::prefix method if possible.

§Examples
let prefixed = Qname::from_str("foo:bar")?;
assert_eq!(prefixed.prefix().map(|s| s.as_str()), Some("foo"));

let noprefix = Qname::from_str("foo")?;
assert_eq!(noprefix.prefix().map(|s| s.as_str()), None);
Source

pub fn local_part(&self) -> &Ncname

Returns the local part.

Note that this is O(length) operation. Consider using ParsedQname::local_part method if possible.

§Examples
let prefixed = Qname::from_str("foo:bar")?;
assert_eq!(prefixed.local_part(), "bar");

let noprefix = Qname::from_str("foo")?;
assert_eq!(noprefix.local_part(), "foo");
Source

pub fn prefix_and_local(&self) -> (Option<&Ncname>, &Ncname)

Returns a pair of the prefix (if available) and the local part.

Note that this is O(length) operation. Consider using ParsedQname::prefix_and_local method if possible.

§Examples
use std::convert::TryFrom;

let noprefix = Qname::from_str("hello")?;
assert_eq!(noprefix.prefix_and_local(), (noprefix.prefix(), noprefix.local_part()));

let prefixed = Qname::from_str("foo:bar")?;
assert_eq!(prefixed.prefix_and_local(), (prefixed.prefix(), prefixed.local_part()));
Source

pub fn into_boxed_str(self: Box<Self>) -> Box<str>

Converts a Box<Qname> into a Box<str> without copying or allocating.

§Examples
let name = Qname::from_str("q:name")?;
let boxed_name: Box<Qname> = name.into();
assert_eq!(&*boxed_name, name);
let boxed_str: Box<str> = boxed_name.into_boxed_str();
assert_eq!(&*boxed_str, name.as_str());

Trait Implementations§

Source§

impl AsRef<Eqname> for Qname

Source§

fn as_ref(&self) -> &Eqname

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Name> for Qname

Source§

fn as_ref(&self) -> &Name

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Nmtoken> for Qname

Source§

fn as_ref(&self) -> &Nmtoken

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Qname> for Ncname

Source§

fn as_ref(&self) -> &Qname

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Qname> for ParsedQname<'_>

Source§

fn as_ref(&self) -> &Qname

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Qname> for Qname

Source§

fn as_ref(&self) -> &Qname

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for Box<Qname>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for Qname

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for &Qname

Source§

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

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

impl Display for &Qname

Source§

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

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

impl<'a> From<&'a Ncname> for &'a Qname

Source§

fn from(s: &'a Ncname) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Qname> for &'a Eqname

Source§

fn from(s: &'a Qname) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Qname> for &'a Name

Source§

fn from(s: &'a Qname) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Qname> for &'a Nmtoken

Source§

fn from(s: &'a Qname) -> Self

Converts to this type from the input type.
Source§

impl From<&Qname> for Arc<Qname>

Source§

fn from(s: &Qname) -> Self

Converts to this type from the input type.
Source§

impl From<&Qname> for Box<Qname>

Source§

fn from(s: &Qname) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Qname> for ParsedQname<'a>

Source§

fn from(s: &'a Qname) -> Self

Converts to this type from the input type.
Source§

impl From<&Qname> for Rc<Qname>

Source§

fn from(s: &Qname) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<ParsedQname<'a>> for &'a Qname

Source§

fn from(s: ParsedQname<'a>) -> Self

Converts to this type from the input type.
Source§

impl Hash for Qname

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Ord for Qname

Source§

fn cmp(&self, other: &Qname) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq<&Qname> for str

Source§

fn eq(&self, o: &&Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&String> for Qname

Source§

fn eq(&self, o: &&String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&str> for Qname

Source§

fn eq(&self, o: &&str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Box<str>> for Qname

Source§

fn eq(&self, o: &Box<str>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Cow<'_, str>> for Qname

Source§

fn eq(&self, o: &Cow<'_, str>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for &String

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for &str

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for Box<str>

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for Cow<'_, str>

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for String

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Qname> for str

Source§

fn eq(&self, o: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<String> for Qname

Source§

fn eq(&self, o: &String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for &Qname

Source§

fn eq(&self, o: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for Box<Qname>

Source§

fn eq(&self, o: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for Qname

Source§

fn eq(&self, o: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Qname

Source§

fn eq(&self, other: &Qname) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<&Qname> for str

Source§

fn partial_cmp(&self, o: &&Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<&String> for Qname

Source§

fn partial_cmp(&self, o: &&String) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<&str> for Qname

Source§

fn partial_cmp(&self, o: &&str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Box<str>> for Qname

Source§

fn partial_cmp(&self, o: &Box<str>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Cow<'_, str>> for Qname

Source§

fn partial_cmp(&self, o: &Cow<'_, str>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for &String

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for &str

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for Box<str>

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for Cow<'_, str>

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for String

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Qname> for str

Source§

fn partial_cmp(&self, o: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<String> for Qname

Source§

fn partial_cmp(&self, o: &String) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<str> for &Qname

Source§

fn partial_cmp(&self, o: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<str> for Box<Qname>

Source§

fn partial_cmp(&self, o: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<str> for Qname

Source§

fn partial_cmp(&self, o: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for Qname

Source§

fn partial_cmp(&self, other: &Qname) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToOwned for Qname

Source§

type Owned = Box<Qname>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

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

impl<'a> TryFrom<&'a Qname> for &'a Ncname

Source§

type Error = NameError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a Qname) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a str> for &'a Qname

Source§

type Error = NameError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for Qname

Source§

impl StructuralPartialEq for Qname

Auto Trait Implementations§

§

impl Freeze for Qname

§

impl RefUnwindSafe for Qname

§

impl Send for Qname

§

impl !Sized for Qname

§

impl Sync for Qname

§

impl Unpin for Qname

§

impl UnwindSafe for Qname

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more