pub struct TestEntry {
pub agora_test: u32,
pub title: String,
pub description: String,
pub post: PostId,
pub inner_type: GovernanceLogEntryType,
pub inner: Value,
}Expand description
The data of a test entry. See the module docs.
Unknown keys are tolerated, as on a record: a stored entry also carries
the writer’s _blind.
Fields§
§agora_test: u32Always TEST_ENTRY_VERSION
title: StringWhat was tested, in a line
description: StringWhat the test was, who heard it and on what models, and why nothing binds (markdown)
post: PostIdThe post the test sitting heard
inner_type: GovernanceLogEntryTypeThe type inner would have been written as
inner: ValueThe inner entry’s data, as it would have been signed, without its
own blind (this entry’s covers it)
Implementations§
Source§impl TestEntry
impl TestEntry
Sourcepub const fn wraps(inner_type: GovernanceLogEntryType) -> bool
pub const fn wraps(inner_type: GovernanceLogEntryType) -> bool
The entry types a test entry may wrap: those that decide something, which is what a test sitting must not do. Not a correction (amendment, key rotation), not a record, obligation, data set or another test
Sourcepub fn council_decision(
title: impl Into<String>,
description: impl Into<String>,
post: PostId,
record: &CouncilDecisionRecord,
) -> Self
pub fn council_decision( title: impl Into<String>, description: impl Into<String>, post: PostId, record: &CouncilDecisionRecord, ) -> Self
A test entry wrapping what a test sitting would have decided.
record.id should be the TEST- id this will be written under
(see validate), and its blind unset.
Sourcepub fn validate(&self, id: &GovernanceLogId) -> Result<(), TestEntryError>
pub fn validate(&self, id: &GovernanceLogId) -> Result<(), TestEntryError>
What a writer refuses to sign as id: another version, a blank
title or description, an inner type it may not wrap, inner data that
is not an object or carries its own blind, an inner id that is not
id, and a council decision that does not parse as one
Sourcepub fn council_record(&self) -> Option<Result<CouncilDecisionRecord, Error>>
pub fn council_record(&self) -> Option<Result<CouncilDecisionRecord, Error>>
inner typed, when it is a council decision
Sourcepub fn labelled_title(title: &str) -> String
pub fn labelled_title(title: &str) -> String
The title a reader is shown: TEST_LABEL first, then the title
Sourcepub fn may_change(pointer: &str) -> bool
pub fn may_change(pointer: &str) -> bool
Whether a redaction or revision at pointer (an RFC 6901 pointer
into the entry’s data) leaves it a test entry: anything but the
machine fields, the whole of inner, and
the root