pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn new(dir: impl Into<PathBuf>, settings: LocalMarkdownSettings) -> Self
pub fn dir(&self) -> &Path
pub fn settings(&self) -> &LocalMarkdownSettings
Sourcepub fn list(&self) -> Result<Vec<Issue>>
pub fn list(&self) -> Result<Vec<Issue>>
Every note that reads as an issue, by id. A second note claiming an id already taken is skipped (the first file name wins).
pub fn get(&self, id: u64) -> Result<Issue>
Sourcepub fn next_id(&self) -> Result<u64>
pub fn next_id(&self) -> Result<u64>
The next free id: the highest in the folder (frontmatter or file name, so a note GitPoulpi cannot read as an issue still counts) plus one.
Sourcepub fn used_values(&self) -> Result<UsedValues>
pub fn used_values(&self) -> Result<UsedValues>
The values already used, for the pickers (case-insensitive unique, first spelling wins).
Sourcepub fn create(&self, new: &NewNote) -> Result<Issue>
pub fn create(&self, new: &NewNote) -> Result<Issue>
Writes a new note <id>-<slug>.md and returns it.
Sourcepub fn fingerprint(dir: &Path) -> u64
pub fn fingerprint(dir: &Path) -> u64
Cheap change detector: a hash of every note’s name, size and modification time. Reads directory metadata only.
Auto Trait Implementations§
impl Forget for Store
impl Freeze for Store
impl Move for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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