MCPcopy Create free account
hub / github.com/awslabs/llrt / should_change_method

Function should_change_method

modules/llrt_fetch/src/fetch.rs:630–640  ·  view source on GitHub ↗
(prev_status: u16, method: &Method)

Source from the content-addressed store, hash-verified

628
629struct StreamingBody {
630 rx: tokio::sync::mpsc::Receiver<Bytes>,
631}
632
633impl http_body::Body for StreamingBody {
634 type Data = Bytes;
635 type Error = Infallible;
636
637 fn poll_frame(
638 mut self: Pin<&mut Self>,
639 cx: &mut Context<'_>,
640 ) -> Poll<Option<std::result::Result<http_body::Frame<Self::Data>, Self::Error>>> {
641 match self.rx.poll_recv(cx) {
642 Poll::Ready(Some(bytes)) => Poll::Ready(Some(Ok(http_body::Frame::data(bytes)))),
643 Poll::Ready(None) => Poll::Ready(None),

Callers 1

build_requestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected