pub struct HeadingLine {
pub level: usize,
pub status: Option<HeadingToken<TaskType>>,
pub priority: Option<HeadingToken<Priority>>,
pub title_start: usize,
}Expand description
A heading line as it sits in a file, located token by token.
This is the read half of an editing operation and the reason it lives here rather than in the editor: the keyword and cookie grammars are the ones the extractor itself applies, and a second copy of them would drift. Writing — assembling a line back from parts — is deliberately not part of this crate.
Unlike Task, which carries the heading the agenda displays, nothing is
dropped here. A heading may hold text between the keyword and the cookie
(# TODO leftover [#B] Title); the agenda discards it, following emacs
org-element--headline-parse-title, but an editor that did the same would
delete what the user typed.
Fields§
§level: usizeHeading level, i.e. the number of leading # characters (1 to 6).
status: Option<HeadingToken<TaskType>>The TODO / DONE / CANCELLED / CANCELED keyword, when present.
priority: Option<HeadingToken<Priority>>The [#A] priority cookie, when present and within the accepted range.
title_start: usizeByte offset the title starts at, past the tokens above and the whitespace after them. Also where a caller inserts a token the heading does not carry yet.
Trait Implementations§
Source§impl Clone for HeadingLine
impl Clone for HeadingLine
Source§fn clone(&self) -> HeadingLine
fn clone(&self) -> HeadingLine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more