Buckets:
| use anyhow::{Result, bail}; | |
| use turbo_tasks::{Completion, ResolvedVc, Vc}; | |
| use turbopack_core::module_graph::GraphEntries; | |
| use crate::{ | |
| project::Project, | |
| route::{Endpoint, EndpointOutput, ModuleGraphs}, | |
| }; | |
| pub struct EmptyEndpoint { | |
| project: ResolvedVc<Project>, | |
| } | |
| impl EmptyEndpoint { | |
| pub fn new(project: ResolvedVc<Project>) -> Vc<Self> { | |
| EmptyEndpoint { project }.cell() | |
| } | |
| } | |
| impl Endpoint for EmptyEndpoint { | |
| fn output(self: Vc<Self>) -> Result<Vc<EndpointOutput>> { | |
| bail!("Empty endpoint can't have output") | |
| } | |
| fn server_changed(self: Vc<Self>) -> Vc<Completion> { | |
| Completion::new() | |
| } | |
| fn client_changed(self: Vc<Self>) -> Vc<Completion> { | |
| Completion::new() | |
| } | |
| fn entries(self: Vc<Self>) -> Vc<GraphEntries> { | |
| GraphEntries::empty() | |
| } | |
| fn module_graphs(self: Vc<Self>) -> Vc<ModuleGraphs> { | |
| Vc::cell(vec![]) | |
| } | |
| fn project(&self) -> Vc<Project> { | |
| *self.project | |
| } | |
| } | |
Xet Storage Details
- Size:
- 1.27 kB
- Xet hash:
- 5bbbadf102f9e4417df834b24b74332c02ad544cd2c7648c1730a7e435a0b481
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.