pub struct SnapshotOptions<'a> {
pub base_ignores: Arc<GitIgnoreFile>,
pub fsmonitor_settings: FsmonitorSettings,
pub progress: Option<&'a SnapshotProgress<'a>>,
pub start_tracking_matcher: &'a dyn Matcher,
pub max_new_file_size: u64,
pub conflict_marker_style: ConflictMarkerStyle,
}Expand description
Options used when snapshotting the working copy. Some of them may be ignored
by some WorkingCopy implementations.
Fields§
§base_ignores: Arc<GitIgnoreFile>The .gitignores to use while snapshotting. The typically come from the
user’s configured patterns combined with per-repo patterns.
fsmonitor_settings: FsmonitorSettingsThe fsmonitor (e.g. Watchman) to use, if any.
progress: Option<&'a SnapshotProgress<'a>>A callback for the UI to display progress.
start_tracking_matcher: &'a dyn MatcherFor new files that are not already tracked, start tracking them if they match this.
max_new_file_size: u64The size of the largest file that should be allowed to become tracked
(already tracked files are always snapshotted). If there are larger
files in the working copy, then LockedWorkingCopy::snapshot() may
(depending on implementation)
return SnapshotError::NewFileTooLarge.
conflict_marker_style: ConflictMarkerStyleExpected conflict marker style for checking for changed files.
Implementations§
Source§impl SnapshotOptions<'_>
impl SnapshotOptions<'_>
Sourcepub fn empty_for_test() -> Self
pub fn empty_for_test() -> Self
Create an instance for use in tests.
Trait Implementations§
Source§impl<'a> Clone for SnapshotOptions<'a>
impl<'a> Clone for SnapshotOptions<'a>
Source§fn clone(&self) -> SnapshotOptions<'a>
fn clone(&self) -> SnapshotOptions<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for SnapshotOptions<'a>
impl<'a> !RefUnwindSafe for SnapshotOptions<'a>
impl<'a> Send for SnapshotOptions<'a>
impl<'a> Sync for SnapshotOptions<'a>
impl<'a> Unpin for SnapshotOptions<'a>
impl<'a> !UnwindSafe for SnapshotOptions<'a>
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