pub enum ConstraintSpec {
Required {
tool: String,
path: String,
},
Enum {
tool: String,
path: String,
values: Vec<String>,
},
Range {
tool: String,
path: String,
min: Option<f64>,
max: Option<f64>,
},
}Expand description
Parameter constraint for the governance ABI.
Maps to crate::governance::constraint::ConstraintRule (structural rules only;
pattern/predicate matching stays in the SDK via VetoCheck).
Variants§
Required
Parameter must be present and non-null.
Enum
Parameter value must be one of values.
Range
Numeric parameter must fall within [min, max].
Trait Implementations§
Source§impl Clone for ConstraintSpec
impl Clone for ConstraintSpec
Source§fn clone(&self) -> ConstraintSpec
fn clone(&self) -> ConstraintSpec
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 ConstraintSpec
impl Debug for ConstraintSpec
Source§impl<'de> Deserialize<'de> for ConstraintSpec
impl<'de> Deserialize<'de> for ConstraintSpec
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
Auto Trait Implementations§
impl Freeze for ConstraintSpec
impl RefUnwindSafe for ConstraintSpec
impl Send for ConstraintSpec
impl Sync for ConstraintSpec
impl Unpin for ConstraintSpec
impl UnsafeUnpin for ConstraintSpec
impl UnwindSafe for ConstraintSpec
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