pub struct CompensationPlanV1 {
pub schema_version: String,
pub compensation_plan_id: CompensationPlanId,
pub effect_intent_id: EffectIntentId,
pub citation: V25ConstitutionCitation,
pub compensation_required: bool,
pub compensation_class: CompensationClassV1,
pub compensation_steps: Vec<String>,
pub success_criteria: Vec<String>,
pub owner_ref: String,
pub latest_start: String,
pub advisory_only: bool,
}Expand description
Plan describing the compensation steps required to reverse or mitigate a failed effect.
When compensation_required is true, compensation_steps must be non-empty.
Fields§
§schema_version: String§compensation_plan_id: CompensationPlanId§effect_intent_id: EffectIntentId§citation: V25ConstitutionCitationCarries EffectiveConstitutionId and CompiledObligationSetId via the canonical v25 citation.
compensation_required: bool§compensation_class: CompensationClassV1§compensation_steps: Vec<String>§success_criteria: Vec<String>§owner_ref: String§latest_start: String§advisory_only: boolImplementations§
Source§impl CompensationPlanV1
impl CompensationPlanV1
pub const SCHEMA_VERSION: &'static str = "CompensationPlanV1"
Sourcepub fn builder(
compensation_plan_id: CompensationPlanId,
effect_intent_id: EffectIntentId,
citation: V25ConstitutionCitation,
compensation_required: bool,
compensation_class: CompensationClassV1,
compensation_steps: Vec<String>,
success_criteria: Vec<String>,
owner_ref: impl Into<String>,
latest_start: impl Into<String>,
advisory_only: bool,
) -> CompensationPlanV1Builder
pub fn builder( compensation_plan_id: CompensationPlanId, effect_intent_id: EffectIntentId, citation: V25ConstitutionCitation, compensation_required: bool, compensation_class: CompensationClassV1, compensation_steps: Vec<String>, success_criteria: Vec<String>, owner_ref: impl Into<String>, latest_start: impl Into<String>, advisory_only: bool, ) -> CompensationPlanV1Builder
Returns a builder for a validated compensation plan artifact.
Sourcepub fn validate(&self) -> EffectValidationResult
pub fn validate(&self) -> EffectValidationResult
Validates the owner-side invariants for a compensation plan.
Trait Implementations§
Source§impl Clone for CompensationPlanV1
impl Clone for CompensationPlanV1
Source§fn clone(&self) -> CompensationPlanV1
fn clone(&self) -> CompensationPlanV1
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 CompensationPlanV1
impl Debug for CompensationPlanV1
Source§impl<'de> Deserialize<'de> for CompensationPlanV1
impl<'de> Deserialize<'de> for CompensationPlanV1
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 CompensationPlanV1
impl JsonSchema for CompensationPlanV1
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CompensationPlanV1
impl PartialEq for CompensationPlanV1
Source§fn eq(&self, other: &CompensationPlanV1) -> bool
fn eq(&self, other: &CompensationPlanV1) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CompensationPlanV1
impl Serialize for CompensationPlanV1
impl StructuralPartialEq for CompensationPlanV1
Auto Trait Implementations§
impl Freeze for CompensationPlanV1
impl RefUnwindSafe for CompensationPlanV1
impl Send for CompensationPlanV1
impl Sync for CompensationPlanV1
impl Unpin for CompensationPlanV1
impl UnsafeUnpin for CompensationPlanV1
impl UnwindSafe for CompensationPlanV1
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