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,
}
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 .gitignore
s to use while snapshotting. The typically come from the
user’s configured patterns combined with per-repo patterns.
fsmonitor_settings: FsmonitorSettings
The 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 Matcher
For new files that are not already tracked, start tracking them if they match this.
max_new_file_size: u64
The 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
.
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>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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