pub struct OwnerGovernanceState {
pub format_version: u32,
pub spool_uuid: Vec<u8>,
pub expected_head: Option<GovernanceStateHead>,
pub sequence: u64,
pub merge_parent_state_hashes: Vec<Vec<u8>>,
pub settings: Option<SpoolSettings>,
pub merge_policies: Vec<GovernanceSettingMergePolicy>,
pub owner_state_hash: Vec<u8>,
pub governance_state_hash: Vec<u8>,
}Expand description
The exact state an owner signs. The client, not Weft, supplies the predecessor link, settings, owner-authority claim, sequence, and final hash.
canonical_owner_governance_state_v1_without_governance_state_hash encodes
fields 1 through 8 in field-number order using the file-level canonical wire
rules. expected_head and settings use their field-number order;
merge_parent_state_hashes are sorted bytewise; merge_policies are sorted
by setting_key. governance_state_hash is:
SHA-256( “heddle-owner-governance-state-v1” || canonical_owner_governance_state_v1_without_governance_state_hash )
The owner signature covers canonical_owner_governance_state_v1, which adds that final hash to fields 1 through 8. No protobuf serialization is signed.
Fields§
§format_version: u32Exactly 1.
spool_uuid: Vec<u8>Raw immutable 16-byte spool UUID.
expected_head: Option<GovernanceStateHead>The compare-and-set predecessor returned by GetOwnerGovernanceHeadResponse.
sequence: u64Exactly expected_head.sequence + 1 and strictly greater than every resolved merge parent sequence.
merge_parent_state_hashes: Vec<Vec<u8>>Additional 32-byte parent state hashes for an explicit graph merge. The expected head is always the first parent and is not repeated here.
settings: Option<SpoolSettings>The complete typed settings payload. Every logical key has exactly one merge policy below.
merge_policies: Vec<GovernanceSettingMergePolicy>§owner_state_hash: Vec<u8>The 32-byte accepted owner-root/transition state whose active authority key is claimed to sign this governance state.
governance_state_hash: Vec<u8>The client-computed 32-byte hash defined above.
Trait Implementations§
Source§impl Clone for OwnerGovernanceState
impl Clone for OwnerGovernanceState
Source§fn clone(&self) -> OwnerGovernanceState
fn clone(&self) -> OwnerGovernanceState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OwnerGovernanceState
impl Debug for OwnerGovernanceState
Source§impl Default for OwnerGovernanceState
impl Default for OwnerGovernanceState
Source§impl Message for OwnerGovernanceState
impl Message for OwnerGovernanceState
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.