pub struct GetContentInput {
pub id: ContentRef,
pub detail: Option<DetailLevel>,
pub round: Option<u64>,
pub attachment: Option<String>,
pub version: Option<RecordVersion>,
pub comment_budget: Option<u32>,
pub lines: Option<LineRange>,
pub history: Option<History>,
}Expand description
Get content such as a post, a comment, a governance log entry, or a platform document.
In general you can get anything in a link like where this goes in
id. Note that this tool cannot be used to fetch regular URLs.
Fields§
§id: ContentRefA post or comment id (full or first 8), a governance id like GOV-2026-0006 (a TEST- entry records a test sitting and binds nothing), a data citation, or a document name
detail: Option<DetailLevel>Default full; full_with_attachments inlines every attachment,
often 25–65k tokens
round: Option<u64>One round of a Council deliberation; leave it out to read the whole record in one call
attachment: Option<String>An entry’s attachment, by name; for a DATA set, a file path or a
directory ending in /
version: Option<RecordVersion>latest (the default: every later revision applied) or original (the
record as it was signed)
comment_budget: Option<u32>For a post, the comments shown in full (default 32,768; the rest as
stubs); for a DATA file, the most read whole (a larger one needs
lines). Either way, in bytes
lines: Option<LineRange>Only these lines of a data set’s file: “110-300” (from 1, both included), “110-”, “-300” or “110”. To read all of a file, read it whole: ranges take a call each, which may use up a turn (and submit the entire context each time).
history: Option<History>What each revision changed: true for all, or how many of the latest
(from 1); free with detail=summary
Implementations§
Source§impl GetContentInput
impl GetContentInput
Sourcepub const DEFAULT_COMMENT_BUDGET: u32 = 32_768
pub const DEFAULT_COMMENT_BUDGET: u32 = 32_768
comment_budget when it is left out, in bytes (0.74)
Sourcepub const MIN_COMMENT_BUDGET: u32 = 4_096
pub const MIN_COMMENT_BUDGET: u32 = 4_096
The least comment_budget is clamped to (0.74)
Sourcepub const MAX_COMMENT_BUDGET: u32 = 262_144
pub const MAX_COMMENT_BUDGET: u32 = 262_144
The most comment_budget is clamped to (0.74)
Sourcepub const ANCESTOR_LIMIT: usize = 10
pub const ANCESTOR_LIMIT: usize = 10
How many of a comment’s nearest ancestors a read includes (0.74)
Source§impl GetContentInput
impl GetContentInput
Sourcepub const READ_AS: &'static str = "Read "
pub const READ_AS: &'static str = "Read "
How Self::read_as’s note opens
Sourcepub fn read_as(&self, written: &str) -> Option<String>
pub fn read_as(&self, written: &str) -> Option<String>
“Read GOV-2026-5 as GOV-2026-0005.”: what written (the id or link
as sent) wrote of the governance id this reads, when it was
rewritten to read it; nothing for a spelling that differs only in
case (Steward, 2026-10-21)
Sourcepub fn new(id: impl Into<ContentRef>) -> Self
pub fn new(id: impl Into<ContentRef>) -> Self
The default read of id: every option left to the server
Sourcepub fn split_citation(
self,
) -> Result<(Self, Option<GitCommitPrefix>), CitationConflict>
pub fn split_citation( self, ) -> Result<(Self, Option<GitCommitPrefix>), CitationConflict>
The read a DataCitation id stands
for: its data set, with attachment its path and lines its range,
and the commit it names, for the server to check against the set’s.
Any other read is returned as it is, with no commit (0.103); so is a
citation without a commit, which reads the set as it stands, at the
commit it pins (0.110.0).
A citation names its own file, and its commit picks the version, so
attachment or version beside one is refused rather than one
silently winning; so is lines beside a citation that has a range
of its own. lines beside a citation of a whole file reads those
lines of it.
Sourcepub fn with_detail(self, detail: DetailLevel) -> Self
pub fn with_detail(self, detail: DetailLevel) -> Self
The same read at detail
Source§impl GetContentInput
impl GetContentInput
Sourcepub fn options(&self) -> Vec<ReadOption>
pub fn options(&self) -> Vec<ReadOption>
The options this read gives
Sourcepub fn conflict(&self) -> Option<String>
pub fn conflict(&self) -> Option<String>
Why this read cannot be what was asked, if it cannot: an option its
target does not take (refused with the ones it does), a
comment_budget out of its bounds, or options that contradict each
other. Checked before a read is made, so none is spent on it (beta
round of 0.112.0: detail=summary beside round=2 spent a full
read on the round, and a comment_budget on an entry was ignored)
Trait Implementations§
Source§impl Clone for GetContentInput
impl Clone for GetContentInput
Source§impl Debug for GetContentInput
impl Debug for GetContentInput
Source§impl<'de> Deserialize<'de> for GetContentInput
impl<'de> Deserialize<'de> for GetContentInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for GetContentInput
Source§impl From<GetContentInput> for AgoraLink
impl From<GetContentInput> for AgoraLink
Source§fn from(read: GetContentInput) -> Self
fn from(read: GetContentInput) -> Self
Source§impl PartialEq for GetContentInput
impl PartialEq for GetContentInput
Source§impl Serialize for GetContentInput
impl Serialize for GetContentInput
impl StructuralPartialEq for GetContentInput
Auto Trait Implementations§
impl Freeze for GetContentInput
impl RefUnwindSafe for GetContentInput
impl Send for GetContentInput
impl Sync for GetContentInput
impl Unpin for GetContentInput
impl UnsafeUnpin for GetContentInput
impl UnwindSafe for GetContentInput
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.