pub enum StdinOutcome {
Commit {
bytes: u64,
},
Abort,
}Expand description
The raw outcome of running a kopia subprocess.
What a stdin producer decided, handed back from the feed closure of
KopiaClient::snapshot_create_stdin_outcome_with.
An enum rather than a bool because the two arms are not “success/failure” — they
are two different LIFECYCLE instructions for a live child process, and getting them
backwards silently commits a truncated backup. Naming them forces the caller to say
which one it means.
Variants§
Commit
The producer finished successfully, having written bytes to the writer.
Let kopia see EOF, finalize the snapshot, and exit.
The count is not telemetry: bytes == 0 is treated as a FAILURE by the
runner (see KopiaError::StdinProducerWroteNothing). Carrying it here
rather than leaving each producer to check for itself keeps that decision
in one place, which is the same reason this is an enum and not a bool.
Abort
The producer did not finish successfully. Kill kopia with stdin still open so it never writes a manifest — no partial snapshot is left behind.
Trait Implementations§
Source§impl Clone for StdinOutcome
impl Clone for StdinOutcome
Source§fn clone(&self) -> StdinOutcome
fn clone(&self) -> StdinOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StdinOutcome
Source§impl Debug for StdinOutcome
impl Debug for StdinOutcome
impl Eq for StdinOutcome
Source§impl PartialEq for StdinOutcome
impl PartialEq for StdinOutcome
Source§fn eq(&self, other: &StdinOutcome) -> bool
fn eq(&self, other: &StdinOutcome) -> bool
self and other values to be equal, and is used by ==.