Skip to main content

Amendment

Struct Amendment 

Source
pub struct Amendment {
    pub agora_governance_amendment: u32,
    pub target: GovernanceLogId,
    pub target_entry_hash: Sha256Hex,
    pub kind: AmendmentKind,
    pub authority: Option<GovernanceLogId>,
    pub basis: String,
    pub note: String,
    pub rationale: Option<String>,
    pub redaction: Option<Redaction>,
}
Expand description

The data of an amendment entry: what an earlier entry now means.

The target is never edited — except its data under a Redaction — so the amendment is the whole record of the change, and both are signed links of the same chain.

Fields§

§agora_governance_amendment: u32§target: GovernanceLogId§target_entry_hash: Sha256Hex

The target’s entry_hash — binds this to one exact entry

§kind: AmendmentKind§authority: Option<GovernanceLogId>

The governance entry that authorizes this, when one does (e.g. GOV-2026-0005). None for a lawful-deletion redaction.

§basis: String

Section or legal basis, human-readable: "§1 (Red Team Cases Recharacterized)", "GDPR Art. 17(1)(a)". Never personal data.

§note: String

The label readers and prompts show next to the target

§rationale: Option<String>

Why, at length — note is the label, this is the reasoning, and it is part of the signed record. Never personal data.

§redaction: Option<Redaction>

Present iff kind is AmendmentKind::Redaction

Implementations§

Source§

impl Amendment

Source

pub fn new( target: GovernanceLogId, target_entry_hash: Sha256Hex, kind: AmendmentKind, basis: impl Into<String>, note: impl Into<String>, ) -> Result<Self, AmendmentError>

An amendment of kind against target.

Redactions go through redaction instead, which is the only way to get a Redaction whose resulting_data_hash is the hash of data that actually exists.

Source

pub fn with_authority(self, authority: GovernanceLogId) -> Self

The amendment with the governance entry that authorizes it

Source

pub fn with_rationale(self, rationale: impl Into<String>) -> Self

The amendment with its rationale

Source

pub fn redaction( amendment_id: &GovernanceLogId, target: GovernanceLogId, target_entry_hash: Sha256Hex, basis: impl Into<String>, note: impl Into<String>, fields: Vec<String>, data: &Value, blind: Blind, ) -> Result<(Self, Value), RedactError>

A redaction of fields from the target’s data, with the redacted data it commits to.

amendment_id is the id this amendment will be appended under: the marker left behind names it, so the redaction says who ordered it. Append both together or neither — the returned data is what the target’s row must hold for verify_chain to accept it. blind is the target’s new Blind: random, so a rehearsal’s resulting_data_hash is not the real one’s.

Source

pub fn validate(&self) -> Result<(), AmendmentError>

Version and the redaction-shape invariant — everything checkable without the rest of the chain

Trait Implementations§

Source§

impl Clone for Amendment

Source§

fn clone(&self) -> Amendment

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Amendment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Amendment

Source§

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 Eq for Amendment

Source§

impl PartialEq for Amendment

Source§

fn eq(&self, other: &Amendment) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Amendment

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Amendment

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PendingHandle for T
where T: Send + 'static,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V