pub struct Board {
pub schema: String,
pub next_number: u64,
pub seq: u64,
pub tasks: BTreeMap<u64, LocalTask>,
/* private fields */
}Expand description
All tasks of one project.
Fields§
§schema: String§next_number: u64The number the next task gets.
seq: u64The last journal sequence written.
tasks: BTreeMap<u64, LocalTask>Implementations§
Source§impl Board
impl Board
Sourcepub fn expire(&mut self, now: DateTime<Utc>) -> Vec<Change>
pub fn expire(&mut self, now: DateTime<Utc>) -> Vec<Change>
Open claims whose time ran out open their task again.
Sourcepub fn has_expired(&self, now: DateTime<Utc>) -> bool
pub fn has_expired(&self, now: DateTime<Utc>) -> bool
Whether a claim ran out by now (a read shows it open).
Sourcepub fn propose(
&mut self,
by: &Actor,
proposal: Proposal,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn propose( &mut self, by: &Actor, proposal: Proposal, now: DateTime<Utc>, ) -> Result<Change, TaskError>
Propose a task (state proposed); anyone may.
Sourcepub fn decide(
&mut self,
number: u64,
by: &Actor,
accept: bool,
reason: Option<&str>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn decide( &mut self, number: u64, by: &Actor, accept: bool, reason: Option<&str>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
Accept (open) or decline (rejected) a proposal; anyone may.
Sourcepub fn claim(
&mut self,
number: u64,
by: &Actor,
minutes: Option<u32>,
now: DateTime<Utc>,
) -> Result<Option<Change>, TaskError>
pub fn claim( &mut self, number: u64, by: &Actor, minutes: Option<u32>, now: DateTime<Utc>, ) -> Result<Option<Change>, TaskError>
Claim an open task, or renew the caller’s own claim. Only agents
claim. None when the call only renewed (no transition).
Sourcepub fn update(
&mut self,
number: u64,
by: &Actor,
summary: &str,
usage: Option<UsageV1>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn update( &mut self, number: u64, by: &Actor, summary: &str, usage: Option<UsageV1>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
The holder reports one line of progress; renews the claim.
Sourcepub fn submit(
&mut self,
number: u64,
by: &Actor,
submission: Submission,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn submit( &mut self, number: u64, by: &Actor, submission: Submission, now: DateTime<Utc>, ) -> Result<Change, TaskError>
The holder’s result: submitted (waits for a check), or failed.
Sourcepub fn amend(
&mut self,
number: u64,
by: &Actor,
amendment: Amendment,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn amend( &mut self, number: u64, by: &Actor, amendment: Amendment, now: DateTime<Utc>, ) -> Result<Change, TaskError>
A result is corrected without a claim (a submit ended it), by
amend_rule and may_amend: on submitted the submitter
replaces summary and evidence; on done the submitter, a person or a
Queen session (never the reviewer)
records the merge once. The update kind: amendment keeps old → new
(amended_from, amended_to). Refused before anything changes.
Sourcepub fn release(
&mut self,
number: u64,
by: &Actor,
reason: Option<&str>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn release( &mut self, number: u64, by: &Actor, reason: Option<&str>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
Give a claimed task back (open): its holder, or a person.
Sourcepub fn verify(
&mut self,
number: u64,
by: &Actor,
verdict: TaskVerdict,
reason: Option<&str>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn verify( &mut self, number: u64, by: &Actor, verdict: TaskVerdict, reason: Option<&str>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
A check of a submitted result: accept → done, reject (with a
reason) → open. Never by the agent that submitted it.
Sourcepub fn stop(
&mut self,
number: u64,
by: &Actor,
reason: Option<&str>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn stop( &mut self, number: u64, by: &Actor, reason: Option<&str>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
Stop a proposed, open or claimed task, with a reason: a person only
(an agent is refused agents_stop). The task ends in the
cancelled state (Hive’s state name).
Mark a task as brought into a Hive vault (journaled; no notice).
Sourcepub fn set_fields(
&mut self,
number: u64,
by: &Actor,
priority: Option<TaskPriority>,
labels: Option<Vec<String>>,
now: DateTime<Utc>,
) -> Result<Change, TaskError>
pub fn set_fields( &mut self, number: u64, by: &Actor, priority: Option<TaskPriority>, labels: Option<Vec<String>>, now: DateTime<Utc>, ) -> Result<Change, TaskError>
Set a task’s priority and/or labels (C0 2.2 E47 on this machine):
fields_version counts every such write. Who may do this is the
caller’s rule (a person or a registered Queen session); a closed
task keeps its fields (task_closed).