Struct ignore_files::IgnoreFilesFromOriginArgs
source · #[non_exhaustive]pub struct IgnoreFilesFromOriginArgs {
pub origin: PathBuf,
pub explicit_watches: Vec<PathBuf>,
pub explicit_ignores: Vec<PathBuf>,
}
Expand description
Arguments for finding ignored files in a given directory and subdirectories
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.origin: PathBuf
Origin from which finding ignored files will start.
explicit_watches: Vec<PathBuf>
Paths that have been explicitly selected to be watched.
If this list is non-empty, all paths not on this list will be ignored.
These paths must be absolute and normalised (no .
and ..
components).
explicit_ignores: Vec<PathBuf>
Paths that have been explicitly ignored.
If this list is non-empty, all paths on this list will be ignored.
These paths must be absolute and normalised (no .
and ..
components).
Implementations§
source§impl IgnoreFilesFromOriginArgs
impl IgnoreFilesFromOriginArgs
sourcepub async fn canonicalise(self) -> Result<Self>
pub async fn canonicalise(self) -> Result<Self>
Canonicalise all paths.
The result is always well-formed.
sourcepub fn new(
origin: impl AsRef<Path>,
explicit_watches: Vec<PathBuf>,
explicit_ignores: Vec<PathBuf>
) -> Result<Self>
pub fn new( origin: impl AsRef<Path>, explicit_watches: Vec<PathBuf>, explicit_ignores: Vec<PathBuf> ) -> Result<Self>
Create args with all fields set and check that they are correctly-formed.
sourcepub fn new_unchecked(
origin: impl AsRef<Path>,
explicit_watches: impl IntoIterator<Item = impl Into<PathBuf>>,
explicit_ignores: impl IntoIterator<Item = impl Into<PathBuf>>
) -> Self
pub fn new_unchecked( origin: impl AsRef<Path>, explicit_watches: impl IntoIterator<Item = impl Into<PathBuf>>, explicit_ignores: impl IntoIterator<Item = impl Into<PathBuf>> ) -> Self
Create args without checking well-formed-ness.
Use this only if you know that the args are well-formed, or if you are about to call
canonicalise()
on them.
Trait Implementations§
source§impl Clone for IgnoreFilesFromOriginArgs
impl Clone for IgnoreFilesFromOriginArgs
source§fn clone(&self) -> IgnoreFilesFromOriginArgs
fn clone(&self) -> IgnoreFilesFromOriginArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IgnoreFilesFromOriginArgs
impl Debug for IgnoreFilesFromOriginArgs
source§impl Default for IgnoreFilesFromOriginArgs
impl Default for IgnoreFilesFromOriginArgs
source§fn default() -> IgnoreFilesFromOriginArgs
fn default() -> IgnoreFilesFromOriginArgs
source§impl From<&Path> for IgnoreFilesFromOriginArgs
impl From<&Path> for IgnoreFilesFromOriginArgs
source§impl PartialEq for IgnoreFilesFromOriginArgs
impl PartialEq for IgnoreFilesFromOriginArgs
source§fn eq(&self, other: &IgnoreFilesFromOriginArgs) -> bool
fn eq(&self, other: &IgnoreFilesFromOriginArgs) -> bool
self
and other
values to be equal, and is used
by ==
.