pub struct ValueMap(/* private fields */);Available on crate feature
xml only.Expand description
A mapping from tag names to Values.
Implementations§
Source§impl ValueMap
impl ValueMap
pub fn new() -> ValueMap
Sourcepub fn get<'v, E>(&'v self) -> Option<Result<E, Error>>
pub fn get<'v, E>(&'v self) -> Option<Result<E, Error>>
Extract a child element of a specific type.
§Returns
Noneif the element doesn’t existSome(Ok(_))if the element exists and was successfully extractedSome(Err(_))if the element exists and extraction failed
Sourcepub fn get_optional<'v, E>(&'v self) -> Option<Option<Result<E, Error>>>
pub fn get_optional<'v, E>(&'v self) -> Option<Option<Result<E, Error>>>
Extract a non-empty child element of a specific type.
§Returns
Noneif the element doesn’t existSome(None)if the element exists and is emptySome(Some(Ok(_)))if the element exists, is not empty and was successfully extractedSome(Some(Err(_)))if the element exists, is not empty and extraction failed
Trait Implementations§
impl StructuralPartialEq for ValueMap
Auto Trait Implementations§
impl Freeze for ValueMap
impl RefUnwindSafe for ValueMap
impl Send for ValueMap
impl Sync for ValueMap
impl Unpin for ValueMap
impl UnsafeUnpin for ValueMap
impl UnwindSafe for ValueMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more