MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / from_buffered

Method from_buffered

crates/openshell-router/src/backend.rs:87–93  ·  view source on GitHub ↗

Create from a fully-buffered [`ProxyResponse`] (for mock routes).

(resp: ProxyResponse)

Source from the content-addressed store, hash-verified

85impl StreamingProxyResponse {
86 /// Create from a fully-buffered [`ProxyResponse`] (for mock routes).
87 pub fn from_buffered(resp: ProxyResponse) -> Self {
88 Self {
89 status: resp.status,
90 headers: resp.headers,
91 body: StreamingBody::Buffered(Some(resp.body)),
92 }
93 }
94
95 /// Read the next body chunk. Returns `None` when the body is exhausted.
96 pub async fn next_chunk(&mut self) -> Result<Option<bytes::Bytes>, RouterError> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected