#[non_exhaustive]pub struct PathspecOptions {
pub cwd_prefix: Option<String>,
pub globals: PathspecGlobalFlags,
pub ignore_case: Option<bool>,
pub from_file: Option<PathspecFile>,
}Expand description
Options for building a Pathspec (Pathspec::parse or Repository::pathspec).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cwd_prefix: Option<String>Work-tree-relative cwd prefix for argv pathspecs (None = repository root).
globals: PathspecGlobalFlagsGlobal pathspec mode flags (defaults match Git with no env vars set).
ignore_case: Option<bool>When set, overrides core.ignorecase for attribute pathspec patterns.
from_file: Option<PathspecFile>Optional --pathspec-from-file payload merged with argv items.
Implementations§
Source§impl PathspecOptions
impl PathspecOptions
Sourcepub fn with_cwd_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_cwd_prefix(self, prefix: impl Into<String>) -> Self
Set Self::cwd_prefix.
Sourcepub fn with_globals(self, globals: PathspecGlobalFlags) -> Self
pub fn with_globals(self, globals: PathspecGlobalFlags) -> Self
Set Self::globals.
Sourcepub fn with_from_file(self, input: PathspecFile) -> Self
pub fn with_from_file(self, input: PathspecFile) -> Self
Set Self::from_file.
Trait Implementations§
Source§impl Clone for PathspecOptions
impl Clone for PathspecOptions
Source§impl Debug for PathspecOptions
impl Debug for PathspecOptions
Auto Trait Implementations§
impl Forget for PathspecOptions
impl Freeze for PathspecOptions
impl RefUnwindSafe for PathspecOptions
impl Send for PathspecOptions
impl Sync for PathspecOptions
impl Unpin for PathspecOptions
impl UnsafeUnpin for PathspecOptions
impl UnwindSafe for PathspecOptions
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
Mutably borrows from an owned value. Read more