Skip to main content

PathMatcher

Struct PathMatcher 

Source
pub struct PathMatcher {
    pub is_negated: bool,
    /* private fields */
}
Expand description

[POL]: Struktura odpowiedzialna za dopasowanie pojedynczego wzorca z uwzględnieniem zależności strukturalnych. [ENG]: Structure responsible for matching a single pattern considering structural dependencies.

Fields§

§is_negated: bool

Implementations§

Source§

impl PathMatcher

Source

pub fn new(pattern: &str, case_sensitive: bool) -> Result<Self, Error>

Source

pub fn is_match(&self, path: &str, env: &HashSet<&str>) -> bool

[POL]: Sprawdza dopasowanie ścieżki, uwzględniając relacje rodzeństwa w strukturze plików. [ENG]: Validates path matching, considering sibling relations within the file structure.

Source

pub fn evaluate<I, S, OnMatch, OnMismatch>( &self, paths: I, env: &HashSet<&str>, strategy: SortStrategy, show_mode: ShowMode, on_match: OnMatch, on_mismatch: OnMismatch, ) -> MatchStats
where I: IntoIterator<Item = S>, S: AsRef<str>, OnMatch: FnMut(&str), OnMismatch: FnMut(&str),

[POL]: Ewaluuje kolekcję ścieżek, sortuje wyniki i wywołuje odpowiednie akcje. [ENG]: Evaluates a path collection, sorts the results, and triggers respective actions.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.