pub struct TradeoffRule {
pub name: String,
pub if_failed: Metric,
pub require: Vec<TradeoffRequirement>,
pub allow: Vec<TradeoffAllowance>,
pub downgrade_to: TradeoffDowngrade,
}Expand description
A structured tradeoff rule for explicit, auditable budget downgrades.
Fields§
§name: StringUnique rule name used in reason tokens.
if_failed: MetricThe failed metric that this rule can downgrade.
require: Vec<TradeoffRequirement>Required compensating improvements.
allow: Vec<TradeoffAllowance>Optional local regression caps that must remain satisfied.
downgrade_to: TradeoffDowngradeDowngrade target when all requirements are satisfied.
Trait Implementations§
Source§impl Clone for TradeoffRule
impl Clone for TradeoffRule
Source§fn clone(&self) -> TradeoffRule
fn clone(&self) -> TradeoffRule
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 TradeoffRule
impl Debug for TradeoffRule
Source§impl<'de> Deserialize<'de> for TradeoffRule
impl<'de> Deserialize<'de> for TradeoffRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for TradeoffRule
impl JsonSchema for TradeoffRule
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for TradeoffRule
impl PartialEq for TradeoffRule
Source§fn eq(&self, other: &TradeoffRule) -> bool
fn eq(&self, other: &TradeoffRule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TradeoffRule
impl Serialize for TradeoffRule
impl StructuralPartialEq for TradeoffRule
Auto Trait Implementations§
impl Freeze for TradeoffRule
impl RefUnwindSafe for TradeoffRule
impl Send for TradeoffRule
impl Sync for TradeoffRule
impl Unpin for TradeoffRule
impl UnsafeUnpin for TradeoffRule
impl UnwindSafe for TradeoffRule
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