fn query_subtext_node<'a>(node: &'a ElementRef, id: Id) -> Result<ElementRef<'a>, Box<dyn Error>> {
        let node_ref = node.next_sibling()
            .ok_or_else(|| {
                log::error!("Did not find subtext node as next sibling from listing node, id = {}", id);
                HnError::HtmlParsingError
            })?;

        let element_ref = ElementRef::wrap(node_ref)
            .ok_or_else(|| {
                log::error!("Could not wrap NodeRef in ElementRef for subtext node, id = {}", id);
                HnError::HtmlParsingError
            })?;
        
        Ok(element_ref)
    }
// This function identifies the subtext node for a listing, which contains
// some of the key fields. The subtext node is the next adjacent sibling node
// from the listing root node (i.e. the node located by the query selector QS_LISTING).
// There are no other distinguishing features to otherwise query this node with a
// query selector.
This function identifies the subtext node for a listing, which contains
some of the key fields. The subtext node is the next adjacent sibling node
from the listing root node .
There are no other distinguishing features to otherwise query this node with a
query selector.
This function identifies the subtext node for a listing which contains some of the key fields . The subtext node is the next adjacent sibling node from the listing root node . There are no other distinguishing features to otherwise query this node with a query selector .
fn query_subtext_node<'a>(node: &'a ElementRef, id: Id) -> Result<ElementRef<'a>, Box<dyn Error>> {
        let node_ref = node.next_sibling()
            .ok_or_else(|| {
                log::error!("Did not find subtext node as next sibling from listing node, id = {}", id);
                HnError::HtmlParsingError
            })?;
        let element_ref = ElementRef::wrap(node_ref)
            .ok_or_else(|| {
                log::error!("Could not wrap NodeRef in ElementRef for subtext node, id = {}", id);
                HnError::HtmlParsingError
            })?;
        Ok(element_ref)
    }
fn query_subtext_node < ' a > ( node : & ' a ElementRef , id : Id ) -> Result < ElementRef < ' a > , Box < dyn Error > > { let node_ref = node . next_sibling ( ) . ok_or_else ( | | { log :: error ! ( " " id ) ; HnError :: HtmlParsingError } ) ? ; let element_ref = ElementRef :: wrap ( node_ref ) . ok_or_else ( | | { log :: error ! ( " " id ) ; HnError :: HtmlParsingError } ) ? ; Ok ( element_ref ) }
This function identifies the subtext node for a listing, which contains
some of the key fields.
This function identifies the subtext node for a listing which contains some of the key fields .
node
&'a ElementRef
id
Id