Skip to main content

TagPayload

Struct TagPayload 

Source
pub struct TagPayload {
    pub name: String,
    pub target_block_id: ObjectId,
    pub message: Option<String>,
    pub created_at: u64,
    pub author_key_id: String,
    pub patch_set_digest: PatchSetDigest,
    pub patch_count: u64,
}
Expand description

Immutable tag payload.

Fields§

§name: String

Tag name.

§target_block_id: ObjectId

Target block ID – the local pointer half of the tag’s identity.

§message: Option<String>

Tag message (optional per FDD-03 §9.8).

§created_at: u64

Canonical no-clock sentinel, matching RefUpdatePayload.created_at (DC-34 “RefUpdate time policy”): zero in every production write, never an authoritative event-time claim. This project has no trusted clock; a real timestamp would require a versioned schema and a persistence design.

§author_key_id: String

Author key ID.

§patch_set_digest: PatchSetDigest

The digest of target_block_id’s own patch closure (RFC 117 T1) – the global-identity half of the tag, portable across repositories that hold the same patches. Required: a tag without one would be the old tag with extra steps.

§patch_count: u64

The number of distinct patch ids in the closure patch_set_digest covers (RFC 117 T7) – already part of what the digest hashes, exposed here so resolution can prune by size before hashing a candidate. A hint that narrows, never an authority: the digest still decides.

Implementations§

Source§

impl TagPayload

Source

pub fn decode_canonical(bytes: &[u8]) -> Result<Self>

Decode a Tag payload from Prikk canonical TLV bytes.

Trait Implementations§

Source§

impl CanonicalEncode for TagPayload

Source§

fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>

Encode this value into canonical bytes.
Source§

fn to_canonical_bytes(&self) -> Result<Vec<u8>>

Return canonical bytes for this value.
Source§

impl Clone for TagPayload

Source§

fn clone(&self) -> TagPayload

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 TagPayload

Source§

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

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

impl Eq for TagPayload

Source§

impl PartialEq for TagPayload

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TagPayload

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<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> 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> 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, <T as TryFrom<U>>::Error>

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.