fn map_node<T, F>(
        self,
        property: &'static str,
        mut action: F,
    ) -> ParseResult<Option<T>, Self::Error>
    where
        F: FnMut(Self) -> ParseResult<T, Self::Error>,
    {
        match self.get_node(property) {
            Ok(node) => action(node).map(|result| Some(result)),
            Err(ParseError::ObjectWithout { .. }) => Ok(None),
            Err(e) => Err(e),
        }
    }
/// Get a child node with this name; if it does not exist, return None.
/// Then transform it through `action`, propagating its Result out.
Get a child node with this name; if it does not exist, return None.
Then transform it through `action`, propagating its Result out.
Get a child node with this name ; if it does not exist return None . Then transform it through ` action ` propagating its Result out .
fn map_node<T, F>(
        self,
        property: &'static str,
        mut action: F,
    ) -> ParseResult<Option<T>, Self::Error>
    where
        F: FnMut(Self) -> ParseResult<T, Self::Error>,
    {
        match self.get_node(property) {
            Ok(node) => action(node).map(|result| Some(result)),
            Err(ParseError::ObjectWithout { .. }) => Ok(None),
            Err(e) => Err(e),
        }
    }
fn map_node < T , F > ( self , property : & ' static str , mut action : F , ) -> ParseResult < Option < T > , Self :: Error > where F : FnMut ( Self ) -> ParseResult < T , Self :: Error > , { match self . get_node ( property ) { Ok ( node ) => action ( node ) . map ( | result | Some ( result ) ) , Err ( ParseError :: ObjectWithout { .. } ) => Ok ( None ) , Err ( e ) => Err ( e ) , } }
Get a child node with this name; if it does not exist, return None.
Get a child node with this name ; if it does not exist return None .
self
property
&'static str
action
F
self
property
&'static str
action
F