pub enum ChiaPeerRemovalOutcome {
Removed,
NoSuchPeer,
}Expand description
What control.chiaPeers.remove actually DID.
An enum rather than a boolean, and deliberately with no always-true companion field, because
remove is the ONLY way to un-trust a peer holding unbounded authority over the money-bearing
wallet replica. A remedy that cannot report its own failure is worse than no remedy: the
operator believes they revoked custody-grade trust and they did not. A consumer has to MATCH on
this, so it cannot render “nothing was there” as “it is gone”.
Variants§
Removed
A matching entry existed and is gone — or, with ban, is now banned.
NoSuchPeer
NOTHING matched the address given. The trusted set is unchanged, so any peer the caller meant to un-trust is STILL trusted — most often because the address was spelled differently from the stored entry. A client MUST surface this as a failure to act, never as success.
Trait Implementations§
Source§impl Clone for ChiaPeerRemovalOutcome
impl Clone for ChiaPeerRemovalOutcome
Source§fn clone(&self) -> ChiaPeerRemovalOutcome
fn clone(&self) -> ChiaPeerRemovalOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more