MCPcopy Create free account
hub / github.com/HFQR/xitca-web / code

Method code

http-encoding/src/coder.rs:127–131  ·  view source on GitHub ↗
(&mut self, item: T)

Source from the content-addressed store, hash-verified

125 type Item = Bytes;
126
127 fn code(&mut self, item: T) -> io::Result<Option<Self::Item>> {
128 Ok(Some(
129 try_downcast_to_bytes(item).unwrap_or_else(|item| Bytes::copy_from_slice(item.as_ref())),
130 ))
131 }
132
133 #[inline]
134 fn code_eof(&mut self) -> io::Result<Option<Self::Item>> {

Callers 1

poll_frameMethod · 0.45

Calls 2

try_downcast_to_bytesFunction · 0.70
as_refMethod · 0.45

Tested by

no test coverage detected