Skip to main content

Board

Struct Board 

Source
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: u64

The number the next task gets.

§seq: u64

The last journal sequence written.

§tasks: BTreeMap<u64, LocalTask>

Implementations§

Source§

impl Board

Source

pub fn expire(&mut self, now: DateTime<Utc>) -> Vec<Change>

Open claims whose time ran out open their task again.

Source

pub fn has_expired(&self, now: DateTime<Utc>) -> bool

Whether a claim ran out by now (a read shows it open).

Source

pub fn propose( &mut self, by: &Actor, proposal: Proposal, now: DateTime<Utc>, ) -> Result<Change, TaskError>

Propose a task (state proposed); anyone may.

Source

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.

Source

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).

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

pub fn mark_shared( &mut self, number: u64, by: &Actor, vault: &str, vault_number: u64, now: DateTime<Utc>, ) -> Result<Change, TaskError>

Mark a task as brought into a Hive vault (journaled; no notice).

Source

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).

Trait Implementations§

Source§

impl Clone for Board

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Board

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Board

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Board

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Board

Source§

impl PartialEq for Board

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Board

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Board

Auto Trait Implementations§

§

impl Forget for Board

§

impl Freeze for Board

§

impl Move for Board

§

impl RefUnwindSafe for Board

§

impl Send for Board

§

impl Sync for Board

§

impl Unpin for Board

§

impl UnsafeUnpin for Board

§

impl UnwindSafe for Board

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.