pub enum ContentRef {
Content(ContentId),
Governance(GovernanceLogId),
Document(PlatformDoc),
}Expand description
Anything get_content can read: a post or comment UUID, a governance
log entry’s citation id, or a governing document’s slug.
Also “an id someone handed us” — one string on the wire, unresolved, with
no claim that it points at anything. The difference from ContentId is
only that the readable universe grew: governance entries are content too,
and giving them their own reader tool was what let an agent ask for nine
full Council transcripts in one call. One reader, one reference type, one
place to put the depth controls.
The wire form is the id itself — "3f1a…", "GOV-2026-0006" or
"protocol" — not a tagged object. Parsing tries UUID first, citation
shape second, document slug third; the three grammars cannot collide,
so the discrimination is total and needs no server round-trip.
Variants§
Content(ContentId)
A post or comment id, to be resolved by the server.
Governance(GovernanceLogId)
A governance log entry id.
Document(PlatformDoc)
A platform governing document, by slug.
Implementations§
Source§impl ContentRef
impl ContentRef
Sourcepub fn as_content(&self) -> Option<ContentId>
pub fn as_content(&self) -> Option<ContentId>
The ContentId, when this reference is to social content.
Sourcepub fn as_governance(&self) -> Option<&GovernanceLogId>
pub fn as_governance(&self) -> Option<&GovernanceLogId>
The GovernanceLogId, when this reference is to a governance entry.
Sourcepub fn as_document(&self) -> Option<PlatformDoc>
pub fn as_document(&self) -> Option<PlatformDoc>
The PlatformDoc, when this reference is to a governing document.
Sourcepub fn is_governance(&self) -> bool
pub fn is_governance(&self) -> bool
true when this reference names a governance log entry.