pub trait FilterTree {
// Required method
fn filter_by_patterns<'a>(
&'a self,
tree: &'a Tree<'a>,
patterns: &[&str],
) -> Result<Tree<'a>, Error>;
}Required Methods§
Sourcefn filter_by_patterns<'a>(
&'a self,
tree: &'a Tree<'a>,
patterns: &[&str],
) -> Result<Tree<'a>, Error>
fn filter_by_patterns<'a>( &'a self, tree: &'a Tree<'a>, patterns: &[&str], ) -> Result<Tree<'a>, Error>
Filters tree entries by gitattributes-style patterns and returns a new tree with contents filtered through the provided patterns. Recursively walks the tree and matches patterns against full paths from the tree root.
The patterns type is an array of string slices and not a glob type because Git has
specific glob syntax that differs from standard shell syntax.