Download next.js/turbopack/crates/turbopack-node/src/execution_context.rs from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/execution_context.rs
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/turbopack/crates/turbopack-node/src/execution_context.rs
-
curl -L -o execution_context.rs https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/execution_context.rs
1.12 kB
| use turbo_tasks::{ResolvedVc, Vc}; | |
| use turbo_tasks_env::ProcessEnv; | |
| use turbo_tasks_fs::FileSystemPath; | |
| use turbopack_core::chunk::ChunkingContext; | |
| pub struct ExecutionContext { | |
| pub project_path: FileSystemPath, | |
| pub chunking_context: ResolvedVc<Box<dyn ChunkingContext>>, | |
| pub env: ResolvedVc<Box<dyn ProcessEnv>>, | |
| } | |
| impl ExecutionContext { | |
| pub fn new( | |
| project_path: FileSystemPath, | |
| chunking_context: ResolvedVc<Box<dyn ChunkingContext>>, | |
| env: ResolvedVc<Box<dyn ProcessEnv>>, | |
| ) -> Vc<Self> { | |
| ExecutionContext { | |
| project_path, | |
| chunking_context, | |
| env, | |
| } | |
| .cell() | |
| } | |
| pub fn project_path(&self) -> Vc<FileSystemPath> { | |
| self.project_path.clone().cell() | |
| } | |
| pub fn chunking_context(&self) -> Vc<Box<dyn ChunkingContext>> { | |
| *self.chunking_context | |
| } | |
| pub fn env(&self) -> Vc<Box<dyn ProcessEnv>> { | |
| *self.env | |
| } | |
| } | |