Download next.js/turbopack/crates/turbopack-node/src/render/mod.rs from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/render/mod.rs
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/turbopack/crates/turbopack-node/src/render/mod.rs
-
curl -L -o mod.rs https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/render/mod.rs
1.67 kB
| use serde::{Deserialize, Serialize}; | |
| use serde_json::Value as JsonValue; | |
| use turbo_rcstr::RcStr; | |
| use turbo_tasks::{FxIndexMap, ReadRef}; | |
| use crate::{ResponseHeaders, StructuredError, route_matcher::Param}; | |
| pub(crate) mod error_page; | |
| pub mod issue; | |
| pub mod node_api_source; | |
| pub mod render_proxy; | |
| pub mod render_static; | |
| pub mod rendered_source; | |
| pub struct RenderData { | |
| params: FxIndexMap<RcStr, Param>, | |
| method: RcStr, | |
| url: RcStr, | |
| original_url: RcStr, | |
| raw_query: RcStr, | |
| raw_headers: Vec<(RcStr, RcStr)>, | |
| path: RcStr, | |
| data: Option<ReadRef<JsonValue>>, | |
| } | |
| enum RenderStaticOutgoingMessage<'a> { | |
| Headers { data: &'a RenderData }, | |
| } | |
| enum RenderProxyOutgoingMessage<'a> { | |
| Headers { data: &'a RenderData }, | |
| BodyChunk { data: &'a [u8] }, | |
| BodyEnd, | |
| } | |
| enum RenderProxyIncomingMessage { | |
| Headers { data: ResponseHeaders }, | |
| BodyChunk { data: Vec<u8> }, | |
| BodyEnd, | |
| Error(StructuredError), | |
| } | |
| enum RenderStaticIncomingMessage { | |
| Response { | |
| status_code: u16, | |
| headers: Vec<(RcStr, RcStr)>, | |
| body: RcStr, | |
| }, | |
| Headers { | |
| data: ResponseHeaders, | |
| }, | |
| BodyChunk { | |
| data: Vec<u8>, | |
| }, | |
| BodyEnd, | |
| Rewrite { | |
| path: RcStr, | |
| }, | |
| Error(StructuredError), | |
| } | |