diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-28 23:52:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 23:52:08 +0200 |
commit | c5302a0587bfdc8a78e8edf7429772f471c47304 (patch) | |
tree | bbe82843bc2bad9bf1a86468a3413828c2f25e5e /runtime/lib.rs | |
parent | 6fb6b0c1f302e8637c96131c9ffc4c4b9f3f5f0f (diff) |
refactor(ext/node): change extension type parameter (#18483)
This commit changes the type parameter for "deno_node" extension, from
`P: NodePermission` to `Env: NodeEnv`.
`NodeEnv` is a new trait that has associated type `P: NodePermission`.
This is a stepping stone to support swappable file system for the
extension, that will be added as a second associated type to the
`NodeEnv` trait.
Diffstat (limited to 'runtime/lib.rs')
-rw-r--r-- | runtime/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/lib.rs b/runtime/lib.rs index 02d52cd5a..57108aa7e 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -36,3 +36,8 @@ pub mod worker; mod worker_bootstrap; pub use worker_bootstrap::BootstrapOptions; + +pub struct RuntimeNodeEnv; +impl deno_node::NodeEnv for RuntimeNodeEnv { + type P = permissions::PermissionsContainer; +} |