summaryrefslogtreecommitdiff
path: root/runtime/code_cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/code_cache.rs')
-rw-r--r--runtime/code_cache.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/runtime/code_cache.rs b/runtime/code_cache.rs
index 2a56543a4..b4a7ce188 100644
--- a/runtime/code_cache.rs
+++ b/runtime/code_cache.rs
@@ -2,20 +2,12 @@
use deno_core::ModuleSpecifier;
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum CodeCacheType {
EsModule,
Script,
}
-impl CodeCacheType {
- pub fn as_str(&self) -> &str {
- match self {
- Self::EsModule => "esmodule",
- Self::Script => "script",
- }
- }
-}
-
pub trait CodeCache: Send + Sync {
fn get_sync(
&self,
@@ -23,6 +15,7 @@ pub trait CodeCache: Send + Sync {
code_cache_type: CodeCacheType,
source_hash: u64,
) -> Option<Vec<u8>>;
+
fn set_sync(
&self,
specifier: ModuleSpecifier,