[−][src]Struct xml::namespace::CheckedTarget
A wrapper around NamespaceStack
which implements Extend
using put_checked()
.
Example
let mut nst = NamespaceStack::empty(); nst.push_empty(); nst.put("a", "urn:A"); nst.put("b", "urn:B"); nst.push_empty(); nst.put("c", "urn:C"); nst.checked_target().extend(vec![("a", "urn:Z"), ("b", "urn:B"), ("c", "urn:Y"), ("d", "urn:D")]); assert_eq!( vec![("a", "urn:Z"), ("c", "urn:C"), ("d", "urn:D"), ("b", "urn:B")], nst.iter().collect::<Vec<_>>() );
Compare:
nst.extend(vec![("a", "urn:Z"), ("b", "urn:B"), ("c", "urn:Y"), ("d", "urn:D")]); assert_eq!( vec![("a", "urn:Z"), ("b", "urn:B"), ("c", "urn:C"), ("d", "urn:D")], nst.iter().collect::<Vec<_>>() );
Trait Implementations
impl<'a, 'b> Extend<(&'b str, &'b str)> for CheckedTarget<'a>
[src]
fn extend<T>(&mut self, iterable: T) where
T: IntoIterator<Item = UriMapping<'b>>,
[src]
T: IntoIterator<Item = UriMapping<'b>>,
Auto Trait Implementations
impl<'a> RefUnwindSafe for CheckedTarget<'a>
impl<'a> Send for CheckedTarget<'a>
impl<'a> Sync for CheckedTarget<'a>
impl<'a> Unpin for CheckedTarget<'a>
impl<'a> !UnwindSafe for CheckedTarget<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,