pub struct WorktreeStatusCache { /* private fields */ }Implementations§
Source§impl WorktreeStatusCache
impl WorktreeStatusCache
pub fn new() -> Self
Sourcepub fn get(&self, path: &Path) -> Option<&WorktreeInfo>
pub fn get(&self, path: &Path) -> Option<&WorktreeInfo>
Get cached worktree info if still valid
Sourcepub fn insert(&mut self, path: PathBuf, info: WorktreeInfo) -> Result<()>
pub fn insert(&mut self, path: PathBuf, info: WorktreeInfo) -> Result<()>
Store worktree info in cache
Sourcepub fn cleanup_stale_entries(&mut self)
pub fn cleanup_stale_entries(&mut self)
Remove stale entries from cache
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Trait Implementations§
Source§impl Clone for WorktreeStatusCache
impl Clone for WorktreeStatusCache
Source§fn clone(&self) -> WorktreeStatusCache
fn clone(&self) -> WorktreeStatusCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorktreeStatusCache
impl Debug for WorktreeStatusCache
Source§impl Default for WorktreeStatusCache
impl Default for WorktreeStatusCache
Source§impl<'de> Deserialize<'de> for WorktreeStatusCache
impl<'de> Deserialize<'de> for WorktreeStatusCache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorktreeStatusCache
impl RefUnwindSafe for WorktreeStatusCache
impl Send for WorktreeStatusCache
impl Sync for WorktreeStatusCache
impl Unpin for WorktreeStatusCache
impl UnsafeUnpin for WorktreeStatusCache
impl UnwindSafe for WorktreeStatusCache
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