pub struct Issue {
pub issue_id: IssueId,
pub title: String,
pub body: String,
pub acceptance: Acceptance,
pub base: Option<String>,
pub deps: BTreeSet<IssueId>,
pub project: Option<String>,
pub created_at: u64,
}Expand description
The persisted issue.
Fields§
§issue_id: IssueId§title: String§body: StringFree text is welcome — it just isn’t the acceptance.
acceptance: Acceptance§base: Option<String>The head the acceptance is declared against (api-diff(base, head)
for a typed delta; where a failing example is observed to fail).
deps: BTreeSet<IssueId>Blocking dependencies: this issue is blocked until each is verified.
project: Option<String>Optional project membership (a project is a subgraph with a goal).
created_at: u64Wall-clock seconds since epoch at creation. Excluded from issue_id.
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn new(
title: impl Into<String>,
body: impl Into<String>,
acceptance: Acceptance,
base: Option<String>,
deps: BTreeSet<IssueId>,
project: Option<String>,
) -> Self
pub fn new( title: impl Into<String>, body: impl Into<String>, acceptance: Acceptance, base: Option<String>, deps: BTreeSet<IssueId>, project: Option<String>, ) -> Self
Build an issue and compute its content-addressed id, stamping the
current wall clock. Use Issue::with_timestamp to control the
timestamp (tests).
pub fn with_timestamp( title: impl Into<String>, body: impl Into<String>, acceptance: Acceptance, base: Option<String>, deps: BTreeSet<IssueId>, project: Option<String>, created_at: u64, ) -> Self
Sourcepub fn computed_id(&self) -> IssueId
pub fn computed_id(&self) -> IssueId
The id this issue’s content hashes to. Equal to issue_id for a
well-formed record; a peer receiving issues over the wire compares the
two so a mismatched id (tampered or miscomputed) is refused instead of
being filed under a name its content doesn’t own.
Sourcepub fn id_is_consistent(&self) -> bool
pub fn id_is_consistent(&self) -> bool
issue_id matches the content hash.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Issue
impl<'de> Deserialize<'de> for Issue
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 Issue
impl StructuralPartialEq for Issue
Auto Trait Implementations§
impl Freeze for Issue
impl RefUnwindSafe for Issue
impl Send for Issue
impl Sync for Issue
impl Unpin for Issue
impl UnsafeUnpin for Issue
impl UnwindSafe for Issue
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
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.