pub struct WorkspaceIndex { /* private fields */ }Implementations§
Source§impl WorkspaceIndex
impl WorkspaceIndex
pub fn load(settings: Settings) -> Result<Self, AgdError>
Sourcepub fn skipped_files(&self) -> impl Iterator<Item = (&Path, &str)>
pub fn skipped_files(&self) -> impl Iterator<Item = (&Path, &str)>
Agenda files left out of the index, with the reason: non-UTF-8 content, or a symlink that resolves outside the roots.
pub fn roots(&self) -> &RootSet
pub fn settings(&self) -> &Settings
Sourcepub fn refresh_path(&mut self, path: &Path) -> Result<(), AgdError>
pub fn refresh_path(&mut self, path: &Path) -> Result<(), AgdError>
Re-reads one changed path, as a file watcher reports it. An agenda
file, including one created after the index loaded, is parsed again;
another .org file under the roots only updates the IDs that make
targets ambiguous; a removed file or directory leaves the index; a
symlink resolving outside the roots is skipped. Other paths are
ignored.
pub fn documents(&self) -> impl Iterator<Item = &OrgDocument>
pub fn items(&self) -> impl Iterator<Item = &Item>
pub fn duplicate_ids(&self) -> impl Iterator<Item = (&str, &[(PathBuf, usize)])>
Sourcepub fn id_in_use(&self, id: &str) -> bool
pub fn id_in_use(&self, id: &str) -> bool
Whether any heading under the roots, agenda file or not, has this
:ID:.
pub fn document(&self, path: &Path) -> Option<&OrgDocument>
pub fn resolve( &self, item_ref: &str, ) -> Result<(&OrgDocument, &HeadlineSpan), AgdError>
Trait Implementations§
Source§impl Clone for WorkspaceIndex
impl Clone for WorkspaceIndex
Auto Trait Implementations§
impl Freeze for WorkspaceIndex
impl RefUnwindSafe for WorkspaceIndex
impl Send for WorkspaceIndex
impl Sync for WorkspaceIndex
impl Unpin for WorkspaceIndex
impl UnsafeUnpin for WorkspaceIndex
impl UnwindSafe for WorkspaceIndex
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