pub struct ExcludeMatcher { /* private fields */ }Expand description
What:
The compiled patterns.
The field is private:
build one with compile_exclude.
Why:
Compiled once per invocation,
then asked once per Markdown candidate.
In TS you’d write (pseudocode):
type ExcludeMatcher = { ignores(path: string): boolean };Implementations§
Source§impl ExcludeMatcher
What:
impl ExcludeMatcher { ... } attaches the one question it answers.
Why:
Callers never see the walk over ancestor directories.
impl ExcludeMatcher
What:
impl ExcludeMatcher { ... } attaches the one question it answers.
Why:
Callers never see the walk over ancestor directories.
In TS you’d write (pseudocode):
class ExcludeMatcher { excludes(path: Uint8Array): boolean }Sourcepub fn excludes(&self, path: &[u8]) -> bool
pub fn excludes(&self, path: &[u8]) -> bool
What:
Whether the patterns name the candidate at path,
Git’s pathname bytes.
Why:
In gitignore semantics a file below an excluded directory stays excluded
even when a later pattern negates the file,
so each ancestor directory is
asked first,
from the top;
only when none is excluded does the file’s own
last match decide.
A pathname this platform cannot spell is not excluded.
In TS you’d write (pseudocode):
excludes(path: Uint8Array): booleanTrait Implementations§
Source§impl Clone for ExcludeMatcher
impl Clone for ExcludeMatcher
Auto Trait Implementations§
impl Freeze for ExcludeMatcher
impl RefUnwindSafe for ExcludeMatcher
impl Send for ExcludeMatcher
impl Sync for ExcludeMatcher
impl Unpin for ExcludeMatcher
impl UnsafeUnpin for ExcludeMatcher
impl UnwindSafe for ExcludeMatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more