#[non_exhaustive]pub struct SyncMetaOptions {
pub ref_override: Option<String>,
pub recurse: bool,
pub max_depth: Option<usize>,
pub force_prune: bool,
pub force_prune_with_ignored: bool,
pub parallel: Option<usize>,
pub quarantine: Option<QuarantineConfig>,
pub retention: Option<RetentionConfig>,
pub dry_run: bool,
}Expand description
Per-meta options threaded through sync_meta. Keeps the call-site
signature small without coupling to the full crate::sync::SyncOptions
surface — the orchestrator (sync.rs::run) is responsible for projecting
SyncOptions into SyncMetaOptions when it wires this entry point.
v1.2.5 — marked #[non_exhaustive] so future PATCH-level field additions
(e.g. new optional knobs threaded through the same struct) do not break
downstream let SyncMetaOptions { .. } destructuring or struct-literal
construction at call sites that omit the new field. External callers
MUST construct via SyncMetaOptions::default() and field assignment on
a mut binding — let mut opts = SyncMetaOptions::default(); opts.recurse = false;. Struct-literal construction (including the ..base spread
shorthand) is rejected by E0639 from outside this crate.
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.ref_override: Option<String>Global ref override (grex sync --ref <sha|branch|tag>). Mirrors
[Walker::with_ref_override]: when Some, every child’s
declared ref is replaced.
recurse: boolWhen true, Phase 3 recurses into child metas. false is the
doctor --shallow semantics: process only the immediate
children of the supplied meta.
max_depth: Option<usize>Bound on Phase 3 recursion depth. None is unbounded; Some(n)
caps at n levels of nesting (the supplied meta_dir is depth
0). Recursion ALWAYS halts before depth n+1.
force_prune: boolPhase 2 prune-safety override. Mirrors
crate::sync::SyncOptions::force_prune.
force_prune_with_ignored: boolPhase 2 prune-safety override. Mirrors
crate::sync::SyncOptions::force_prune_with_ignored.
parallel: Option<usize>v1.2.1 item 3 — rayon thread-pool size for sibling-parallel
Phase 1 + Phase 3. None ⇒ rayon’s default (num_cpus::get());
Some(1) ⇒ effectively sequential (single-threaded pool, useful
for determinism testing); Some(n >= 2) ⇒ bounded parallel.
Some(0) is clamped to 1 (rayon rejects a zero-thread pool).
Mirrors crate::sync::SyncOptions::parallel semantics with the
one exception that 0 is clamped to 1 here — the unbounded
sentinel only makes sense for tokio’s Semaphore::MAX_PERMITS.
quarantine: Option<QuarantineConfig>v1.2.1 item 5b — when Some, Phase 2 prunes are diverted
through the snapshot-then-unlink quarantine pipeline before
unlink(dest) fires. Carries the per-meta trash bucket root
and audit-log path. None (default) preserves the legacy
v1.2.0 direct-unlink path. Set by
crate::sync::SyncOptions::quarantine at the orchestrator
boundary; the consent layer reads this to pick the deletion
strategy. Lean theorem quarantine_snapshot_precedes_delete
proves the safety contract.
retention: Option<RetentionConfig>v1.2.5 — when Some, every meta sync starts with a best-effort
GC sweep over <meta>/.grex/trash/ per the supplied retention
window. None (default) preserves v1.2.1 indefinite-retention
behavior. Set by crate::sync::SyncOptions::retain_days at
the orchestrator boundary; threaded through every recursion
frame so each meta’s own trash bucket gets swept. Sweep
failures log via tracing and DO NOT halt the sync.
dry_run: boolv1.3.1 (B4) — when true, Phase 1 SKIPS every clone/fetch
subprocess + lockfile + events.jsonl mutation. The walker still
traverses the manifest tree (parsing in-memory) and accumulates
one DryRunWouldCloneRecord per child that WOULD have been
cloned into SyncMetaReport::dry_run_would_clone. Lean
theorem Grex.Walker.dry_run_no_side_effects formalises the
invariant dry_run = true ⇒ no network call ∧ no FS write.
Default: false (preserves v1.3.0 mutation semantics for the
default sync path).
Trait Implementations§
Source§impl Clone for SyncMetaOptions
impl Clone for SyncMetaOptions
Source§fn clone(&self) -> SyncMetaOptions
fn clone(&self) -> SyncMetaOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyncMetaOptions
impl Debug for SyncMetaOptions
Auto Trait Implementations§
impl Freeze for SyncMetaOptions
impl RefUnwindSafe for SyncMetaOptions
impl Send for SyncMetaOptions
impl Sync for SyncMetaOptions
impl Unpin for SyncMetaOptions
impl UnsafeUnpin for SyncMetaOptions
impl UnwindSafe for SyncMetaOptions
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