/// Gets the descendants of each element in the current set of matched
/// elements, filter by a selector. It returns a new Selection object
/// containing these matched elements.
Gets the descendants of each element in the current set of matched
elements, filter by a selector. It returns a new Selection object
containing these matched elements.
Gets the descendants of each element in the current set of matched elements filter by a selector . It returns a new Selection object containing these matched elements .
pub fn try_select(&self, sel: &str) -> Option<Selection<'a>> {
        match Matcher::new(sel) {
            Ok(matcher) => {
                let nodes: Vec<Node> = Matches::from_list(
                    self.nodes.clone().into_iter(),
                    matcher,
                    MatchScope::ChildrenOnly,
                )
                .collect();
                if nodes.len() > 0 {
                    Some(Selection { nodes })
                } else {
                    None
                }
            }
            Err(_) => None,
        }
    }
pub fn try_select ( & self , sel : & str ) -> Option < Selection < ' a > > { match Matcher :: new ( sel ) { Ok ( matcher ) => { let nodes : Vec < Node > = Matches :: from_list ( self . nodes . clone ( ) . into_iter ( ) , matcher , MatchScope :: ChildrenOnly , ) . collect ( ) ; if nodes . len ( ) > 0 { Some ( Selection { nodes } ) } else { None } } Err ( _ ) => None , } }
Gets the descendants of each element in the current set of matched
elements, filter by a selector.
Gets the descendants of each element in the current set of matched elements filter by a selector .
&self
sel
&str