pub struct IssueHeading {
pub id: String,
pub title: String,
pub state: String,
pub priority: char,
pub properties: BTreeMap<String, String>,
pub org_tags: Vec<String>,
pub property_order: Vec<String>,
pub body: String,
pub logbook: Vec<LogEntry>,
pub line_start: usize,
pub line_end: usize,
}Expand description
One issue: a top-level org heading with a properties drawer, an optional logbook, and free-form body prose.
Fields§
§id: String§title: String§state: String§priority: char§properties: BTreeMap<String, String>Tags written on the heading itself, which is where Org’s own tag
search and agenda look. Kept apart from the :TAGS: property so each
round-trips as it was written; IssueHeading::tags reads both.
property_order: Vec<String>§body: String§logbook: Vec<LogEntry>§line_start: usize§line_end: usizeImplementations§
Source§impl IssueHeading
impl IssueHeading
Sourcepub fn blocked_by(&self) -> Vec<String>
pub fn blocked_by(&self) -> Vec<String>
Ids listed in :BLOCKED_BY:. Commas and whitespace both separate, so
values written by hand or by an importer parse the same way.
Every tag on the issue: the :TAGS: property and the heading’s own Org
tags, in that order and without duplicates.
pub fn deadline(&self) -> Option<&str>
pub fn scheduled(&self) -> Option<&str>
pub fn parent(&self) -> Option<&str>
Sourcepub fn claimed_by(&self) -> Option<&str>
pub fn claimed_by(&self) -> Option<&str>
The identity holding this issue, when one has claimed it.
Sourcepub fn claimed_at(&self) -> Option<&str>
pub fn claimed_at(&self) -> Option<&str>
When the claim was taken, as the stored org timestamp.
Sourcepub fn claim_age_days(&self, today: NaiveDate) -> Option<i64>
pub fn claim_age_days(&self, today: NaiveDate) -> Option<i64>
Whole days the claim has been held, when it parses as a date.
Sourcepub fn set_claim(&mut self, identity: &str)
pub fn set_claim(&mut self, identity: &str)
Record the claim. Stores the identity verbatim: it is an opaque tag.
Sourcepub fn release_claim(&mut self) -> Option<(String, String)>
pub fn release_claim(&mut self) -> Option<(String, String)>
Drop the claim, leaving a logbook note so the history survives the properties being cleared.
pub fn render(&self) -> String
Sourcepub fn record_state_change(&mut self, new_state: &str)
pub fn record_state_change(&mut self, new_state: &str)
Move to new_state and prepend the transition to the logbook. A
transition to the current state is not recorded.
Trait Implementations§
Source§impl Clone for IssueHeading
impl Clone for IssueHeading
Source§fn clone(&self) -> IssueHeading
fn clone(&self) -> IssueHeading
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IssueHeading
impl Debug for IssueHeading
impl Eq for IssueHeading
Source§impl PartialEq for IssueHeading
impl PartialEq for IssueHeading
Source§impl Serialize for IssueHeading
impl Serialize for IssueHeading
impl StructuralPartialEq for IssueHeading
Auto Trait Implementations§
impl Freeze for IssueHeading
impl RefUnwindSafe for IssueHeading
impl Send for IssueHeading
impl Sync for IssueHeading
impl Unpin for IssueHeading
impl UnsafeUnpin for IssueHeading
impl UnwindSafe for IssueHeading
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,
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.