pub struct Name<'doc, 'input> {
pub namespace: Option<&'doc str>,
pub local: &'input str,
}Fields§
§namespace: Option<&'doc str>§local: &'input strTrait Implementations§
Source§impl<'doc, 'input> Ord for Name<'doc, 'input>
impl<'doc, 'input> Ord for Name<'doc, 'input>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<&str> for Name<'_, '_>
let doc = Document::parse(r#"<foo xmlns="http://bar"/>"#).unwrap();
let root_name = doc.root_element().name().unwrap();
assert_eq!(root_name.namespace, Some("http://bar"));
assert_eq!(root_name.local, "foo");
assert_eq!(root_name, "foo");
impl PartialEq<&str> for Name<'_, '_>
let doc = Document::parse(r#"<foo xmlns="http://bar"/>"#).unwrap();
let root_name = doc.root_element().name().unwrap();
assert_eq!(root_name.namespace, Some("http://bar"));
assert_eq!(root_name.local, "foo");
assert_eq!(root_name, "foo");Source§impl<'doc, 'input> PartialOrd for Name<'doc, 'input>
impl<'doc, 'input> PartialOrd for Name<'doc, 'input>
impl<'doc, 'input> Copy for Name<'doc, 'input>
impl<'doc, 'input> Eq for Name<'doc, 'input>
impl<'doc, 'input> StructuralPartialEq for Name<'doc, 'input>
Auto Trait Implementations§
impl<'doc, 'input> Freeze for Name<'doc, 'input>
impl<'doc, 'input> RefUnwindSafe for Name<'doc, 'input>
impl<'doc, 'input> Send for Name<'doc, 'input>
impl<'doc, 'input> Sync for Name<'doc, 'input>
impl<'doc, 'input> Unpin for Name<'doc, 'input>
impl<'doc, 'input> UnwindSafe for Name<'doc, 'input>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more