pub struct ValueMap(/* private fields */);
Expand description
A mapping from tag names to Value
s.
Implementations§
Source§impl ValueMap
impl ValueMap
pub fn new() -> Self
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
None
if 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
None
if 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 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