fn sub_leaves(&self, section: &str) -> Self
    where
        Self: Clone + FromIterator<(String, V)>,
    {
        self.clone()
            .into_iter()
            .filter_map(|(k, v)| {
                let k = k.as_ref();
                if section.is_empty() && !k.contains('.') {
                    Some((k.to_string(), v))
                } else if k.starts_with(section)
                    && k[section.len()..].starts_with('.')
                    && !k[section.len() + 1..].contains('.')
                {
                    Some((k[section.len() + 1..].to_string(), v))
                } else {
                    None
                }
            })
            .collect()
    }
/// Implements the `SubLeaves` API function.
Implements the `SubLeaves` API function.
Implements the ` SubLeaves ` API function .
fn sub_leaves(&self, section: &str) -> Self
    where
        Self: Clone + FromIterator<(String, V)>,
    {
        self.clone()
            .into_iter()
            .filter_map(|(k, v)| {
                let k = k.as_ref();
                if section.is_empty() && !k.contains('.') {
                    Some((k.to_string(), v))
                } else if k.starts_with(section)
                    && k[section.len()..].starts_with('.')
                    && !k[section.len() + 1..].contains('.')
                {
                    Some((k[section.len() + 1..].to_string(), v))
                } else {
                    None
                }
            })
            .collect()
    }
fn sub_leaves ( & self , section : & str ) -> Self where Self : Clone + FromIterator < ( String , V ) > , { self . clone ( ) . into_iter ( ) . filter_map ( | ( k , v ) | { let k = k . as_ref ( ) ; if section . is_empty ( ) && ! k . contains ( '.' ) { Some ( ( k . to_string ( ) , v ) ) } else if k . starts_with ( section ) && k [ section . len ( ) .. ] . starts_with ( '.' ) && ! k [ section . len ( ) + 1 .. ] . contains ( '.' ) { Some ( ( k [ section . len ( ) + 1 .. ] . to_string ( ) , v ) ) } else { None } } ) . collect ( ) }
Implements the `SubLeaves` API function.
Implements the ` SubLeaves ` API function .
&self
section
&str
&self
section
&str