pub struct RefStatePayload {
pub ref_name: String,
pub kind: RefKind,
pub target_object_id: ObjectId,
pub update_seq: u64,
pub previous_ref_state_id: Option<ObjectId>,
pub required_attestation_ids: Vec<ObjectId>,
pub closed: bool,
}Expand description
RefState payload stored as a content-addressed object.
Fields§
§ref_name: StringHuman-readable ref name.
kind: RefKindRef kind.
target_object_id: ObjectIdTarget object ID.
update_seq: u64Monotonic sequence number.
previous_ref_state_id: Option<ObjectId>Previous ref-state object ID.
required_attestation_ids: Vec<ObjectId>Required attestation IDs that justified this state.
closed: boolWhether this ref state closes the ref (DC-61). Tag 7. Encoded only when true — an
open ref state must remain byte-identical to the pre-DC-61 six-field encoding, so this must
never be emitted as an explicit false. Schema-2 only; a schema-1 payload carrying tag 7 at
all (true or false) is malformed. Closure carries no other information: the pointer,
target, and history are unchanged, so reopening is an ordinary CAS update to a new state
with this field simply absent again.
Implementations§
Source§impl RefStatePayload
impl RefStatePayload
Sourcepub fn decode_canonical(bytes: &[u8], schema_version: u32) -> Result<Self>
pub fn decode_canonical(bytes: &[u8], schema_version: u32) -> Result<Self>
Decode a RefState payload from Prikk canonical TLV bytes. schema_version comes from the
object envelope carrying these bytes — decoding is schema-aware because tag 7 is legal only
at REF_STATE_CLOSED_SCHEMA and above.
Trait Implementations§
Source§impl CanonicalEncode for RefStatePayload
impl CanonicalEncode for RefStatePayload
Source§fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
Source§impl Clone for RefStatePayload
impl Clone for RefStatePayload
Source§fn clone(&self) -> RefStatePayload
fn clone(&self) -> RefStatePayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more