pub enum Refusal {
Show 17 variants
NotPublished {
state: LifecycleState,
},
InstanceMismatch {
named: String,
actual: String,
},
DefinitionMismatch {
named: String,
offered: String,
},
DigestMismatch {
bound: String,
presented: String,
},
StaleRevision {
offered: u64,
current: u64,
},
WorkspaceMismatch {
offered: String,
caller: String,
},
AudienceMismatch {
audience: Audience,
},
AssertionRequired,
ExtraControl {
control: String,
},
DuplicateControl {
control: String,
},
MissingRequiredControl {
control: String,
},
WrongControlType {
control: String,
expected: &'static str,
found: &'static str,
},
MalformedValue {
control: String,
expected: String,
found: String,
},
UnknownOption {
control: String,
option: String,
},
UnknownAction {
option: String,
},
ActionNotEligible {
option: String,
audience: Audience,
},
Protocol(ProtocolError),
}Expand description
Why a response was refused. Every variant is a REFUSAL: there is no variant meaning “accepted with reservations”.
Variants§
NotPublished
The offer is not open for answers.
Fields
state: LifecycleStateThe state the offer is actually in.
InstanceMismatch
The response answers a different offer.
DefinitionMismatch
The response answers a different definition than the offer binds.
DigestMismatch
The definition presented is not the one the response was minted against — it changed by at least one byte.
Fields
StaleRevision
The responder answered an older revision.
Fields
WorkspaceMismatch
The offer belongs to a different workspace fence.
AudienceMismatch
The responder answered from an audience the offer is not open to.
AssertionRequired
The offer requires an authenticated assertion and none was presented.
ExtraControl
The response answers a control the definition does not offer.
DuplicateControl
The response answers one control twice.
MissingRequiredControl
A REQUIRED control has no answer.
WrongControlType
The value’s kind does not match the control’s kind.
Fields
MalformedValue
The value is the control’s kind, but not a well-formed one of it —
not-a-date for a date, 11 for a number capped at 10.
Distinct from WrongControlType on purpose:
that one is a responder answering the wrong FIELD SHAPE, which is a
protocol error, while this is a human typing something that is not what
was asked for. A surface can correct the second inline and can do
nothing about the first.
Fields
UnknownOption
The chosen option is not one the control offers.
UnknownAction
The chosen option maps to no caller-registered handler.
ActionNotEligible
The action exists but this responder may not invoke it.
Protocol(ProtocolError)
Content addressing failed while checking a binding.
Trait Implementations§
Source§impl Error for Refusal
impl Error for Refusal
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()