pub struct IssueDoc {
pub project: String,
pub path: PathBuf,
pub preamble: String,
pub headings: Vec<IssueHeading>,
}Expand description
One project’s issues.org: a preamble followed by top-level headings.
Fields§
§project: String§path: PathBuf§preamble: String§headings: Vec<IssueHeading>Implementations§
Source§impl IssueDoc
impl IssueDoc
pub fn empty(project: &str, path: PathBuf) -> Self
Sourcepub fn parse_file(project: &str, path: &Path) -> Result<Self>
pub fn parse_file(project: &str, path: &Path) -> Result<Self>
Parse path, or produce an empty document when the file is absent.
pub fn parse(project: &str, path: PathBuf, content: &str) -> Result<Self>
Sourcepub fn write(&self) -> Result<()>
pub fn write(&self) -> Result<()>
Render and replace the file through a uniquely named temporary. Callers
hold with_issues_lock around the parse and this write.
pub fn known_ids(&self) -> Vec<String>
pub fn upsert(&mut self, heading: IssueHeading)
pub fn remove(&mut self, id: &str) -> Option<IssueHeading>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IssueDoc
impl RefUnwindSafe for IssueDoc
impl Send for IssueDoc
impl Sync for IssueDoc
impl Unpin for IssueDoc
impl UnsafeUnpin for IssueDoc
impl UnwindSafe for IssueDoc
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
Mutably borrows from an owned value. Read more