pub struct IgnoreRules { /* private fields */ }Expand description
The patterns of a .dockerignore file, applied the way Docker applies them.
Each line is trimmed; a line starting with # is a comment and a blank line is skipped;
! makes an exception. The pattern is cleaned as Go’s filepath.Clean cleans it and a
leading / is dropped, so /foo, ./foo and foo/ all mean foo. A pattern matches a
path when it matches the path itself or any of its parent directories, so node_modules
excludes everything under it; the last line that matches decides, so a later ! line
re-includes.
The glob is Go’s filepath.Match plus **: * and ? stop at /, [...] is a
character class negated by ^ (not !, which is a member), \ escapes the next
character, **/ matches any number of directories including none, and a trailing **
matches anything. These are the semantics of moby’s patternmatcher, which
microvms-core/tests/context_fuzz.rs checks against a rebuilt copy of its regex
translation.
Implementations§
Trait Implementations§
Source§impl Clone for IgnoreRules
impl Clone for IgnoreRules
Source§impl Debug for IgnoreRules
impl Debug for IgnoreRules
Auto Trait Implementations§
impl Freeze for IgnoreRules
impl RefUnwindSafe for IgnoreRules
impl Send for IgnoreRules
impl Sync for IgnoreRules
impl Unpin for IgnoreRules
impl UnsafeUnpin for IgnoreRules
impl UnwindSafe for IgnoreRules
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