pub struct ScriptCache { /* private fields */ }Expand description
Cache for compiled scripts.
Implementations§
Source§impl ScriptCache
impl ScriptCache
Sourcepub fn insert(&mut self, path: PathBuf, script: Arc<CompiledScript>)
pub fn insert(&mut self, path: PathBuf, script: Arc<CompiledScript>)
Insert a script into the cache.
Sourcepub fn remove(&mut self, path: &Path) -> Option<Arc<CompiledScript>>
pub fn remove(&mut self, path: &Path) -> Option<Arc<CompiledScript>>
Remove a script from the cache.
Sourcepub fn evict_stale(&mut self) -> Vec<PathBuf>
pub fn evict_stale(&mut self) -> Vec<PathBuf>
Remove stale scripts from the cache.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ScriptCache
impl !RefUnwindSafe for ScriptCache
impl Send for ScriptCache
impl Sync for ScriptCache
impl Unpin for ScriptCache
impl !UnwindSafe for ScriptCache
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
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging