pub struct TagFile { /* private fields */ }Implementations§
Source§impl TagFile
impl TagFile
pub fn load(path: &Path) -> Result<Self, Error>
Sourcepub fn reload_if_changed(&mut self) -> Result<bool, Error>
pub fn reload_if_changed(&mut self) -> Result<bool, Error>
Re-stat the on-disk tag file and, if its mtime changed, re-parse it
in place. Returns Ok(true) when a reload happened, Ok(false)
otherwise. Stat or parse errors that occur during reload are
surfaced as Err; callers may choose to surface them as a status
hint and keep using the previously-loaded state.
pub fn lookup(&self, name: &str) -> &[TagEntry]
pub fn names(&self) -> impl Iterator<Item = &str>
pub fn base_dir(&self) -> &Path
Sourcepub fn find_walking_up(start: &Path) -> Option<PathBuf>
pub fn find_walking_up(start: &Path) -> Option<PathBuf>
Walk up from start looking for a tags file. If start is a
regular file, begin at its parent directory. Returns the first
tags found, or None at the filesystem root.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TagFile
impl RefUnwindSafe for TagFile
impl Send for TagFile
impl Sync for TagFile
impl Unpin for TagFile
impl UnsafeUnpin for TagFile
impl UnwindSafe for TagFile
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