pub struct ConstitutionRule {
pub id: String,
pub rule_type: ConstitutionRuleRuleType,
pub scope: ConstitutionRuleScope,
pub scope_targets: Option<Vec<String>>,
pub action: String,
pub obligated_action: Option<String>,
pub penalty: ConstitutionRulePenalty,
pub description: Option<String>,
pub immutable: Option<bool>,
pub priority: Option<i64>,
}Expand description
ConstitutionRule model.
Fields§
§id: StringStable slug, e.g. no-privilege-escalation.
rule_type: ConstitutionRuleRuleType§scope: ConstitutionRuleScopeWho the rule binds. The document previously listed global/tenant/agent, none of which
the server has ever emitted.
scope_targets: Option<Vec<String>>Agent ids, team ids or role names, depending on scope. Absent for all_agents.
action: StringThe action the rule governs, e.g. modify_constitution.
obligated_action: Option<String>For requirement rules: the action that must be performed.
penalty: ConstitutionRulePenalty§description: Option<String>§immutable: Option<bool>Genesis rules cannot be amended or removed.
priority: Option<i64>Conflict resolution — higher wins. Defaults to 0.
Trait Implementations§
Source§impl Clone for ConstitutionRule
impl Clone for ConstitutionRule
Source§fn clone(&self) -> ConstitutionRule
fn clone(&self) -> ConstitutionRule
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 ConstitutionRule
impl Debug for ConstitutionRule
Source§impl Default for ConstitutionRule
impl Default for ConstitutionRule
Source§fn default() -> ConstitutionRule
fn default() -> ConstitutionRule
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConstitutionRule
impl<'de> Deserialize<'de> for ConstitutionRule
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 PartialEq for ConstitutionRule
impl PartialEq for ConstitutionRule
Source§impl Serialize for ConstitutionRule
impl Serialize for ConstitutionRule
impl StructuralPartialEq for ConstitutionRule
Auto Trait Implementations§
impl Freeze for ConstitutionRule
impl RefUnwindSafe for ConstitutionRule
impl Send for ConstitutionRule
impl Sync for ConstitutionRule
impl Unpin for ConstitutionRule
impl UnsafeUnpin for ConstitutionRule
impl UnwindSafe for ConstitutionRule
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