pub struct AmendmentDraft {
pub amendment: Amendment,
pub texts: AmendmentTexts,
}Expand description
An Amendment and the texts it commits to: what a writer appends,
the first as the entry’s data and the second beside it
Fields§
§amendment: Amendment§texts: AmendmentTextsImplementations§
Source§impl AmendmentDraft
impl AmendmentDraft
Sourcepub fn new(
target: GovernanceLogId,
target_entry_hash: Sha256Hex,
kind: AmendmentKind,
basis: impl Into<CommittedText>,
note: impl Into<CommittedText>,
) -> Result<Self, AmendmentError>
pub fn new( target: GovernanceLogId, target_entry_hash: Sha256Hex, kind: AmendmentKind, basis: impl Into<CommittedText>, note: impl Into<CommittedText>, ) -> Result<Self, AmendmentError>
Sourcepub fn redaction(
amendment_id: &GovernanceLogId,
target: GovernanceLogId,
target_entry_hash: Sha256Hex,
basis: impl Into<CommittedText>,
note: impl Into<CommittedText>,
fields: Vec<String>,
data: &Value,
blind: Blind,
) -> Result<(Self, Value), RedactError>
pub fn redaction( amendment_id: &GovernanceLogId, target: GovernanceLogId, target_entry_hash: Sha256Hex, basis: impl Into<CommittedText>, note: impl Into<CommittedText>, 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.
The draft with the governance entry that authorizes it
Sourcepub fn with_rationale(self, rationale: impl Into<CommittedText>) -> Self
pub fn with_rationale(self, rationale: impl Into<CommittedText>) -> Self
The draft with its rationale
Trait Implementations§
Source§impl Clone for AmendmentDraft
impl Clone for AmendmentDraft
Source§fn clone(&self) -> AmendmentDraft
fn clone(&self) -> AmendmentDraft
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 AmendmentDraft
impl Debug for AmendmentDraft
impl Eq for AmendmentDraft
Source§impl PartialEq for AmendmentDraft
impl PartialEq for AmendmentDraft
impl StructuralPartialEq for AmendmentDraft
Auto Trait Implementations§
impl Freeze for AmendmentDraft
impl RefUnwindSafe for AmendmentDraft
impl Send for AmendmentDraft
impl Sync for AmendmentDraft
impl Unpin for AmendmentDraft
impl UnsafeUnpin for AmendmentDraft
impl UnwindSafe for AmendmentDraft
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