pub enum CommandOutcome {
Verified,
Rejected {
reason: String,
},
Unverified {
stage: VerifyStage,
},
}Expand description
The result of verifying a control command.
The ACK (result == "success") is necessary but not sufficient: for
commands with an observable effect the effect is also confirmed from the
report, and a new print_error after the command is treated as a rejection
(observed: a failing SD card ACKed project_file then never printed).
Variants§
Verified
ACKed success and, for effectful commands, the effect was observed.
Rejected
The printer rejected the command (ACK result != success) or a new
device error appeared right after it. reason is human-readable.
Unverified
Sent but not confirmed — never assume success. stage says whether we
never saw an ACK (VerifyStage::Ack) or saw the ACK but never the
effect (VerifyStage::Effect).
Fields
§
stage: VerifyStageTrait Implementations§
Source§impl Clone for CommandOutcome
impl Clone for CommandOutcome
Source§fn clone(&self) -> CommandOutcome
fn clone(&self) -> CommandOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandOutcome
impl Debug for CommandOutcome
impl Eq for CommandOutcome
Source§impl PartialEq for CommandOutcome
impl PartialEq for CommandOutcome
Source§fn eq(&self, other: &CommandOutcome) -> bool
fn eq(&self, other: &CommandOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CommandOutcome
impl Serialize for CommandOutcome
impl StructuralPartialEq for CommandOutcome
Auto Trait Implementations§
impl Freeze for CommandOutcome
impl RefUnwindSafe for CommandOutcome
impl Send for CommandOutcome
impl Sync for CommandOutcome
impl Unpin for CommandOutcome
impl UnsafeUnpin for CommandOutcome
impl UnwindSafe for CommandOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.