Skip to main content

PathMatchers

Struct PathMatchers 

Source
pub struct PathMatchers { /* private fields */ }
Expand description

[POL]: Kontener przechowujący kolekcję silników dopasowujących ścieżki. [ENG]: A container holding a collection of path matching engines.

Implementations§

Source§

impl PathMatchers

Source

pub fn new<I, S>(patterns: I, case_sensitive: bool) -> Result<Self, Error>
where I: IntoIterator<Item = S>, S: AsRef<str>,

[POL]: Tworzy nową instancję, kompilując listę wzorców po uprzednim rozwinięciu klamer. [ENG]: Creates a new instance by compiling a list of patterns after performing brace expansion.

Source

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

[POL]: Weryfikuje, czy ścieżka spełnia warunki narzucone przez zbiór wzorców (w tym negacje). [ENG]: Verifies if the path meets the conditions imposed by the pattern set (including negations).

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 zbiór ścieżek, sortuje je i wykonuje odpowiednie domknięcia. [ENG]: Evaluates a set of paths, sorts them, and executes respective closures.

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.