pub enum RuntimeContractViolation {
Show 14 variants
InvalidConfiguration {
policy: RuntimeContractPolicy,
},
EmptyBudgetName,
InvalidBudgetName,
ZeroBudgetCapacity {
dimension: BudgetDimension,
},
ZeroBudgetRate,
ZeroBudgetMaxAge,
ReserveExceedsBudgetCapacity {
dimension: BudgetDimension,
},
ReserveWithoutBudgetCapacity {
dimension: BudgetDimension,
},
ChildBudgetExceedsParent {
dimension: BudgetDimension,
},
ChildBudgetMaxAgeExceedsParent,
PermitTargetInDifferentTree,
InvalidMemoryLimit {
policy: RuntimeContractPolicy,
},
InvalidSchedule {
policy: RuntimeContractPolicy,
},
InvalidMetadataConfiguration {
policy: RuntimeContractPolicy,
},
}Expand description
A deterministic caller configuration or invariant violation.
This type deliberately has no operational source or retry metadata. Its fields identify only bounded policy and invariant names; callers must not use it to carry configuration contents.
Variants§
InvalidConfiguration
A runtime configuration field violated its documented invariant.
Fields
policy: RuntimeContractPolicyThe closed policy identifier.
EmptyBudgetName
A resource-budget name is blank.
InvalidBudgetName
A resource-budget name is structurally invalid.
ZeroBudgetCapacity
A budget capacity is zero.
Fields
dimension: BudgetDimensionThe affected budget dimension.
ZeroBudgetRate
A configured rate has a zero limit or burst.
ZeroBudgetMaxAge
A configured budget maximum age is zero.
ReserveExceedsBudgetCapacity
A reserve exceeds its own capacity.
Fields
dimension: BudgetDimensionThe affected budget dimension.
ReserveWithoutBudgetCapacity
A reserve was configured without the corresponding capacity.
Fields
dimension: BudgetDimensionThe affected budget dimension.
ChildBudgetExceedsParent
A child limit exceeds its parent limit.
Fields
dimension: BudgetDimensionThe affected budget dimension.
ChildBudgetMaxAgeExceedsParent
A child maximum age exceeds its parent maximum age.
PermitTargetInDifferentTree
A permit was asked to move across unrelated budget trees.
InvalidMemoryLimit
A memory limit input is not a positive finite value.
Fields
policy: RuntimeContractPolicyThe closed memory-limit policy identifier.
InvalidSchedule
A scheduler definition is invalid.
Fields
policy: RuntimeContractPolicyThe closed schedule policy identifier.
InvalidMetadataConfiguration
Metadata actor configuration is invalid.
Fields
policy: RuntimeContractPolicyThe closed metadata policy identifier.
Implementations§
Source§impl RuntimeContractViolation
impl RuntimeContractViolation
Sourcepub const fn condition(&self) -> CanonicalCondition
pub const fn condition(&self) -> CanonicalCondition
Returns a stable contract condition for this deterministic violation.
Trait Implementations§
Source§impl Clone for RuntimeContractViolation
impl Clone for RuntimeContractViolation
Source§impl Debug for RuntimeContractViolation
impl Debug for RuntimeContractViolation
Source§impl Display for RuntimeContractViolation
impl Display for RuntimeContractViolation
impl Eq for RuntimeContractViolation
Source§impl Error for RuntimeContractViolation
impl Error for RuntimeContractViolation
1.30.0 · 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()