pub struct IssueHeading {Show 13 fields
pub id: String,
pub title: String,
pub state: String,
pub priority: char,
pub properties: BTreeMap<String, String>,
pub org_tags: Vec<String>,
pub statistics: Option<String>,
pub property_order: Vec<String>,
pub extra_drawers: 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:ID: value, <project>-<suffix>.
title: StringHeading title, without a trailing tag run.
state: StringTODO keyword on the heading.
priority: charPriority cookie character (A, B, or C).
properties: BTreeMap<String, String>Property drawer, including planning keys held in the map.
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.
statistics: Option<String>Trailing statistics cookies ([2/5], [40%]), which Org keeps on
the headline after the title (manual 5.5).
property_order: Vec<String>Drawer keys in on-disk order, so a rewrite leaves a hand-arranged drawer alone.
extra_drawers: Vec<String>Drawers other than :PROPERTIES: and :LOGBOOK: that sat at the
drawer site. Written back after those two so a rewrite does not drop
a :NOTES: drawer someone put there.
body: StringProse under the heading, without the property drawer or logbook.
logbook: Vec<LogEntry>:LOGBOOK: lines, newest first.
line_start: usize1-based first line of this heading in the file.
line_end: usize1-based last line of this heading in the file.
Implementations§
Source§impl IssueHeading
impl IssueHeading
Sourcepub fn blocked_by(&self) -> Vec<String>
pub fn blocked_by(&self) -> Vec<String>
Ids this heading waits on.
:BLOCKED_BY: is the vissue form. :BLOCKEDBY: is a typo for that.
:BLOCKER: is GNU ELPA org-edna (and org-depend in org-contrib):
an ids(...) form or a bare id list both count; prev-sibling and
the rest of the condition language do not.
Own tags plus inherited FILETAGS (Org ALLTAGS for a top-level heading).
Every tag on the issue: the :VISSUE_TAGS: property and the heading’s
own Org tags, in that order and without duplicates.
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.
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
Heading, planning line, drawers, and body as they are written to disk.
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.