gix_glob::search

Trait Pattern

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

    // Required method
    fn bytes_to_patterns(
        bytes: &[u8],
        source: &Path,
    ) -> Vec<Mapping<Self::Value>>;
}
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§

source

type Value: PartialEq + Eq + Debug + Hash + Ord + PartialOrd + Clone

The value associated with a pattern.

Required Methods§

source

fn bytes_to_patterns(bytes: &[u8], source: &Path) -> Vec<Mapping<Self::Value>>

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§