pub trait Pattern: Clone + PartialEq + Eq + Debug + Hash + Ord + PartialOrd + Default {
    type Value: PartialEq + Eq + Debug + Hash + Ord + PartialOrd + Clone;

    fn bytes_to_patterns(bytes: &[u8]) -> Vec<PatternMapping<Self::Value>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn may_use_glob_pattern(pattern: &Pattern) -> bool; }
Expand description

A trait to convert bytes into patterns and their associated value.

This is used for gitattributes which have a value, and gitignore which don’t.

Required Associated Types

The value associated with a pattern.

Required Methods

Parse all patterns in bytes line by line, ignoring lines with errors, and collect them.

Returns true if the given pattern may be used for matching.

Implementors