pub struct Account<K: Kind> { /* private fields */ }Expand description
The one account of the content a request walked in with: what that content IS, and what it declares it stands on.
Every reading of a request’s content reads THIS value — the intent derived from it, the triggers that watch it, the declaration that caused it, the node it stands at — and none of them keeps a copy. A second list of what content depends on would agree with this one until it did not, and nothing downstream could tell which of the two a plan was planned over.
§Nonclaims
It says nothing about whether the commitment is current, reachable, or admitted anywhere: it is the address the caller handed over, read exactly.
Implementations§
Source§impl<K: Kind> Account<K>
impl<K: Kind> Account<K>
Sourcepub fn anchoring(&self) -> Anchoring
pub fn anchoring(&self) -> Anchoring
What a transcript derived over this account hangs off.
Read off the account’s own commitment, so a plan’s anchor and a plan’s stated cause are one fact rather than two that could disagree.
Sourcepub fn origin_node(&self) -> Identity<OriginNode>
pub fn origin_node(&self) -> Identity<OriginNode>
The origin node this account’s content stands at.
Derived under the content commitment, so changing its kind, captured declaration, or canonical content moves the node through the binding’s stronger identity rather than a second restatement of those facts.
Sourcepub fn dependency_edges(&self) -> Vec<OriginEdge>
pub fn dependency_edges(&self) -> Vec<OriginEdge>
The origin edges this account contributes: one per declared dependency, each running from what the content stands on to the content itself.
The relation is OriginRelation::ExplicitLink because that is what happened — an author supplied this dependency set at the door.
It is no semantic derivation: nothing here derived meaning from a dependency.
§Ordering
The edges are a FAN-IN and not a walk: every one of them ends at Account::origin_node, so consecutive edges do not join and the set is not a trail.
A caller draws trails through these edges one at a time rather than handing the set to a trail constructor, which would refuse the discontinuity — correctly.
Sourcepub fn cause_triggers(&self) -> Vec<InvalidationTrigger>
pub fn cause_triggers(&self) -> Vec<InvalidationTrigger>
The triggers that watch this account’s commitment and every dependency it declares.
Sourcepub fn cause_trigger(&self) -> Result<InvalidationTrigger, PlanError>
pub fn cause_trigger(&self) -> Result<InvalidationTrigger, PlanError>
The single trigger that watches this account’s own content.
The deliberately narrow reading, for a caller that can carry one trigger and no more.
§Errors
Returns PlanIssue::CauseSetUnwatchable where the account also names dependencies: one trigger cannot state that cause set, and a watch covering the commitment alone would read exactly like a complete one.
Source§impl<K: Kind> Account<K>
impl<K: Kind> Account<K>
Sourcepub fn intent_bytes(&self) -> Vec<u8> ⓘ
pub fn intent_bytes(&self) -> Vec<u8> ⓘ
The intent’s canonical bytes on their own — the exact preimage Account::intent is derived over.
Written from the pair and never read back off the identity: a preimage road that spelled the digest would hand back thirty-two bytes nobody can re-derive anything from, and the derivation it feeds would be defined in terms of its own output.
Sourcepub fn encode_into(&self, into: &mut Vec<u8>)
pub fn encode_into(&self, into: &mut Vec<u8>)
Appends this account’s canonical bytes: the intent preimage, then the dependency set, canonicalized.
The account’s bytes therefore BEGIN with exactly the intent’s preimage, through the same road Account::intent_bytes hands back, rather than through a second spelling that happens to agree today.
Source§impl<K: Kind> Account<K>
impl<K: Kind> Account<K>
Sourcepub fn over(binding: ContentBinding<K>) -> Self
pub fn over(binding: ContentBinding<K>) -> Self
The account of content that stands on nothing.
Sourcepub fn standing_on(
binding: ContentBinding<K>,
dependencies: Vec<Identity<CapturedDeclaration>>,
) -> Result<Self, PlanError>
pub fn standing_on( binding: ContentBinding<K>, dependencies: Vec<Identity<CapturedDeclaration>>, ) -> Result<Self, PlanError>
The account of content that stands on the captures the caller declares.
The set is canonicalized here — ordered by identity, exact repeats dropped — so two callers declaring one set in two orders reach one plan.
§Errors
Returns the planning refusal naming BoundAxis::Declarations where the declared set outgrows DEPENDENCY_LIMIT.
Sourcepub const fn commitment(&self) -> Identity<CapturedDeclaration>
pub const fn commitment(&self) -> Identity<CapturedDeclaration>
The one address the caller supplied at the door.
The reading a plan’s anchor, its causing-declaration answer, and its own trigger are all taken from — one value read three times rather than three seats that could disagree.
Sourcepub const fn kind(&self) -> Identity<ProjectionKind>
pub const fn kind(&self) -> Identity<ProjectionKind>
The owner-qualified kind identity this account carries.
Sourcepub const fn content_commitment(&self) -> Identity<ProjectionContent>
pub const fn content_commitment(&self) -> Identity<ProjectionContent>
The commitment over the kind-specific content’s canonical bytes.
Sourcepub fn dependencies(&self) -> &[Identity<CapturedDeclaration>]
pub fn dependencies(&self) -> &[Identity<CapturedDeclaration>]
The captures this content declares it stands on, in canonical order.
Sourcepub fn intent(&self) -> Intent
pub fn intent(&self) -> Intent
What was MEANT: the owner-qualified kind over the content commitment, derived into the intent layer’s own identity.
The preimage is Account::intent_bytes, derived at Role::ProjectionIntent, rooted, at position zero.
Rooted deliberately: the preimage already carries the commitment at full width, so anchoring on that same commitment would write it twice into one derivation and separate nothing.