Skip to main content

Act

Struct Act 

Source
pub struct Act {
    pub act_id: Uuid,
    pub actor_lct: Uuid,
    pub address: ActAddress,
    pub kind: String,
    pub consequence: ConsequenceClass,
    pub substance: SubstanceRef,
    pub witnesses: Vec<WitnessAttestation>,
    pub at: DateTime<Utc>,
}
Expand description

A thin, witnessed governance record of an entity externalizing work — the unifying primitive behind memory writes, handoffs, and forum posts.

Fields§

§act_id: Uuid§actor_lct: Uuid

The acting entity — the from. Rides in the payload; the ledger envelope’s signer may differ (HUB’s identity bridge: the machine/track LCT signs the envelope, an arc-LCT is actor_lct here).

§address: ActAddress

Recipient + MRH relevance horizon, in one field.

§kind: String

Act kind — lets a recipient route/filter without opening the substance. Convention (HUB, hub↔core converged): a bare <verb> for fleet/peer acts (handoff, memo, sweep, forum); the notify:<event> namespace for hub→citizen notifications (the act-reversed case, e.g. notify:intro_accepted). The notify:* sub-vocabulary is hub-minted; the canonical registry lives in the society/ledger spec. Open set — extend freely.

§consequence: ConsequenceClass

How reversible the act’s effect is.

§substance: SubstanceRef

Pointer to the fat substance this act governs.

§witnesses: Vec<WitnessAttestation>

Flat witness marks — entities attesting they observed the act.

§at: DateTime<Utc>

Implementations§

Source§

impl Act

Source

pub fn memory( actor_lct: Uuid, substance: SubstanceRef, at: DateTime<Utc>, ) -> Self

A memory write — an act to your future self (temporal MRH). Default kind "memo".

Source

pub fn handoff( actor_lct: Uuid, peer_lct: Uuid, substance: SubstanceRef, at: DateTime<Utc>, ) -> Self

A handoff — an act to a peer (lateral MRH). Default kind "handoff".

Source

pub fn forum( actor_lct: Uuid, society_lct: Uuid, substance: SubstanceRef, at: DateTime<Utc>, ) -> Self

A forum post — an act to the society at large (broad MRH). Default kind "forum".

Source

pub fn addressed( actor_lct: Uuid, address: ActAddress, kind: impl Into<String>, substance: SubstanceRef, at: DateTime<Utc>, ) -> Self

The general constructor — any ActAddress + kind (incl. the hub→Citizen notify:<event> case and Role fan-out).

Source

pub fn with_kind(self, kind: impl Into<String>) -> Self

Override the act kind — e.g. a more specific verb than a constructor’s default, or a notify:<event> on a Citizen-addressed act.

Source

pub fn with_consequence(self, c: ConsequenceClass) -> Self

Source

pub fn witnessed_by(self, attestation: WitnessAttestation) -> Self

Source

pub fn mrh_direction(&self) -> MrhDirection

The coarse MRH axis this act reaches across (derived from its address).

Source

pub fn requires_atp_stake(&self) -> bool

Whether this act must carry an ATP stake before it’s admissible. The gate is on irreversibility: you stake energy on acts you can’t take back.

Source

pub fn requires_witness(&self) -> bool

Whether this act must be witnessed to be admissible (irreversibles must).

Source

pub fn record_outcome( &self, trust: &mut TrustValueScore, outcome: ActOutcome, ) -> (f64, f64)

Fold this act’s realized ActOutcome into the actor’s [EntityTrust] — “EntityTrust fed by act-outcomes”. A fulfilled act builds Validity/Veracity; a failed one debits them; the consequence class scales the magnitude (more is staked on irreversibles, so the trust swing is larger). Returns the realized (validity, veracity) deltas.

Trait Implementations§

Source§

impl Clone for Act

Source§

fn clone(&self) -> Self

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 Act

Source§

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

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

impl<'de> Deserialize<'de> for Act

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 PartialEq for Act

Source§

fn eq(&self, other: &Self) -> 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 Act

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 Act

Auto Trait Implementations§

§

impl Freeze for Act

§

impl RefUnwindSafe for Act

§

impl Send for Act

§

impl Sync for Act

§

impl Unpin for Act

§

impl UnsafeUnpin for Act

§

impl UnwindSafe for Act

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> 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> 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