pub enum ContentRef {
Content(ContentId),
Governance(GovernanceLogId),
}Expand description
Anything get_content can read: a post or comment UUID, or a governance
log entry’s citation id.
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…" or "GOV-2026-0006" — not a
tagged object. Parsing tries UUID first and citation shape second; the two
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.
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 is_governance(&self) -> bool
pub fn is_governance(&self) -> bool
true when this reference names a governance log entry.
Trait Implementations§
Source§impl Clone for ContentRef
impl Clone for ContentRef
Source§fn clone(&self) -> ContentRef
fn clone(&self) -> ContentRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more