pub struct PathCache { /* private fields */ }Expand description
Cache for resolved filesystem-style paths.
Implementations§
Source§impl PathCache
impl PathCache
pub fn new(max_size: usize) -> Self
pub fn get(&mut self, key: &str) -> Option<&str>
pub fn insert(&mut self, key: &str, resolved: &str)
pub fn invalidate(&mut self, key: &str) -> bool
pub fn contains(&self, key: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn hits(&self) -> u64
pub fn misses(&self) -> u64
pub fn hit_rate(&self) -> f32
pub fn clear(&mut self)
pub fn max_size(&self) -> usize
Auto Trait Implementations§
impl Freeze for PathCache
impl RefUnwindSafe for PathCache
impl Send for PathCache
impl Sync for PathCache
impl Unpin for PathCache
impl UnsafeUnpin for PathCache
impl UnwindSafe for PathCache
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