pub enum DryRun {
Yes,
No,
}Expand description
Whether an update run only previewed its plan without writing any change to disk.
Shared by json::render_update/json::update_to_document and table::render_update
so --dry-run cannot be transposed with another positional flag at either call site.
Variants§
Yes
--dry-run was passed: the plan was computed but never written to disk.
No
A real run: applied edits were written to disk.
Implementations§
Source§impl DryRun
impl DryRun
Sourcepub fn from_flag(dry_run: bool) -> Self
pub fn from_flag(dry_run: bool) -> Self
Builds a DryRun from the --dry-run CLI flag (true means Self::Yes).
The single, explicitly named conversion point from that boundary’s bool
representation (issue #1436 S1) — deliberately not a From<bool> impl; see
deps_core::cache::NetworkMode::from_offline_flag’s doc for why an ambient blanket
impl defeats the point of typing this API.
Trait Implementations§
impl Copy for DryRun
impl Eq for DryRun
impl StructuralPartialEq for DryRun
Auto Trait Implementations§
impl Freeze for DryRun
impl RefUnwindSafe for DryRun
impl Send for DryRun
impl Sync for DryRun
impl Unpin for DryRun
impl UnsafeUnpin for DryRun
impl UnwindSafe for DryRun
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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