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

Method with_assert_byte_controller

modules/llrt_stream_web/src/readable/objects.rs:103–113  ·  view source on GitHub ↗
(
        mut self,
        f: impl FnOnce(ReadableByteStreamObjects<'js, R>) -> Result<ReadableByteStreamObjects<'js, R>>,
    )

Source from the content-addressed store, hash-verified

101 }
102
103 pub(super) fn with_assert_byte_controller(
104 mut self,
105 f: impl FnOnce(ReadableByteStreamObjects<'js, R>) -> Result<ReadableByteStreamObjects<'js, R>>,
106 ) -> Result<Self> {
107 ((), self) = self.with_controller(
108 (),
109 |_, _| panic!("expected byte controller, found default controller"),
110 |(), controller| Ok(((), f(controller)?)),
111 )?;
112 Ok(self)
113 }
114
115 pub(super) fn with_controller<Ctx, O>(
116 self,

Callers 1

chunk_stepsMethod · 0.80

Calls 1

with_controllerMethod · 0.45

Tested by

no test coverage detected