| use anyhow::{Result, bail}; | |
| use turbo_tasks::{Completion, Vc}; | |
| use turbopack_core::module_graph::GraphEntries; | |
| use crate::route::{Endpoint, EndpointOutput, ModuleGraphs}; | |
| pub struct EmptyEndpoint; | |
| impl EmptyEndpoint { | |
| pub fn new() -> Vc<Self> { | |
| EmptyEndpoint.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![]) | |
| } | |
| } | |