Skip to main content

Entry

Struct Entry 

Source
pub struct Entry<'a> {
Show 16 fields pub id: u32, pub kind: &'static str, pub title: &'a str, pub status: Option<&'static str>, pub decision: Option<&'static str>, pub asked: Option<&'static str>, pub tags: &'a [String], pub links: &'a [u32], pub repo_links: Vec<String>, pub linked_from: Vec<u32>, pub created: String, pub description: &'a str, pub comments: Vec<EntryComment<'a>>, pub tracked_minutes: Option<i64>, pub running: bool, pub path: Option<String>,
}
Expand description

An entry with everything an agent needs to act on it.

Fields§

§id: u32

The id to pass to other commands.

§kind: &'static str

task, note or decision.

§title: &'a str

One-line title.

§status: Option<&'static str>

Tasks only: todo, doing, parked or done.

§decision: Option<&'static str>

Decisions only: accepted, proposed or rejected.

§asked: Option<&'static str>

A parked task’s question: waiting for an answer or answered.

§tags: &'a [String]

Lowercase, without #.

§links: &'a [u32]

Ids this entry links to. Empty fields are left out, as every token counts for an agent.

§repo_links: Vec<String>

Entries of the project’s other repositories this one links to, as shop-api#3.

§linked_from: Vec<u32>

Ids of entries linking to this one.

§created: String

RFC 3339.

§description: &'a str

Free text (markdown).

§comments: Vec<EntryComment<'a>>

Oldest first.

§tracked_minutes: Option<i64>

Tracked time in minutes, if the task was ever tracked.

§running: bool

Whether the task’s clock is running now; only present when it is.

§path: Option<String>

The markdown file, to read or edit directly.

Implementations§

Source§

impl<'a> Entry<'a>

Source

pub fn new(brain: &Brain, task: &'a Task) -> Self

The full JSON shape of task, with its backlinks from brain.

Trait Implementations§

Source§

impl<'a> Debug for Entry<'a>

Source§

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

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

impl<'a> Serialize for Entry<'a>

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

Auto Trait Implementations§

§

impl<'a> Freeze for Entry<'a>

§

impl<'a> RefUnwindSafe for Entry<'a>

§

impl<'a> Send for Entry<'a>

§

impl<'a> Sync for Entry<'a>

§

impl<'a> Unpin for Entry<'a>

§

impl<'a> UnsafeUnpin for Entry<'a>

§

impl<'a> UnwindSafe for Entry<'a>

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