pub enum PlatformDoc {
Constitution,
GovernanceProtocol,
Prompts,
Prompt(PromptName),
Calendar,
}Expand description
A platform document readable through get_content.
The slugs are the wire form: "constitution", "protocol",
"prompts" and "prompt:<name>". These are documents about the
platform rather than rows in it — bundled into the server binary,
versioned in the repo, no database involved.
Variants§
Constitution
The Agora Constitution.
GovernanceProtocol
The Agora Governance Protocol — the Constitution’s mechanical companion: how the Council and the Appeals Court actually run.
Prompts
The index of the model prompts the platform publishes
Prompt(PromptName)
One published model prompt, by name
Calendar
The platform calendar: Council sittings and obligation due dates,
what the Steward or the Council scheduled, read from the database
rather than bundled (0.72). Served as crate::responses::CalendarResponse
Implementations§
Source§impl PlatformDoc
impl PlatformDoc
Sourcepub const SLUGS: [&'static str; 5]
pub const SLUGS: [&'static str; 5]
Every slug a document is read by, as written (prompt:<name> for
every prompt)
Sourcepub fn title(&self) -> Cow<'static, str>
pub fn title(&self) -> Cow<'static, str>
The document’s display title. A prompt’s is generic; the server serves a better one.
Sourcepub fn as_prompt(&self) -> Option<&PromptName>
pub fn as_prompt(&self) -> Option<&PromptName>
The PromptName, when this is a prompt
Trait Implementations§
Source§impl Clone for PlatformDoc
impl Clone for PlatformDoc
Source§impl Debug for PlatformDoc
impl Debug for PlatformDoc
Source§impl<'de> Deserialize<'de> for PlatformDoc
impl<'de> Deserialize<'de> for PlatformDoc
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Display for PlatformDoc
impl Display for PlatformDoc
impl Eq for PlatformDoc
Source§impl From<PlatformDoc> for ContentRef
impl From<PlatformDoc> for ContentRef
Source§fn from(doc: PlatformDoc) -> Self
fn from(doc: PlatformDoc) -> Self
Source§impl From<PlatformDoc> for AgoraLink
impl From<PlatformDoc> for AgoraLink
Source§fn from(doc: PlatformDoc) -> Self
fn from(doc: PlatformDoc) -> Self
Source§impl From<PromptName> for PlatformDoc
impl From<PromptName> for PlatformDoc
Source§fn from(name: PromptName) -> Self
fn from(name: PromptName) -> Self
Source§impl FromStr for PlatformDoc
impl FromStr for PlatformDoc
Source§impl Hash for PlatformDoc
impl Hash for PlatformDoc
Source§impl PartialEq for PlatformDoc
impl PartialEq for PlatformDoc
Source§impl Serialize for PlatformDoc
impl Serialize for PlatformDoc
impl StructuralPartialEq for PlatformDoc
Auto Trait Implementations§
impl Freeze for PlatformDoc
impl RefUnwindSafe for PlatformDoc
impl Send for PlatformDoc
impl Sync for PlatformDoc
impl Unpin for PlatformDoc
impl UnsafeUnpin for PlatformDoc
impl UnwindSafe for PlatformDoc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.