MCPcopy Create free account
hub / github.com/Recordscript/recordscript / next

Method next

libs/hbb_common/src/tcp.rs:177–187  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

175
176 #[inline]
177 pub async fn next(&mut self) -> Option<Result<BytesMut, Error>> {
178 let mut res = self.0.next().await;
179 if let Some(Ok(bytes)) = res.as_mut() {
180 if let Some(key) = self.2.as_mut() {
181 if let Err(err) = key.dec(bytes) {
182 return Some(Err(err));
183 }
184 }
185 }
186 res
187 }
188
189 #[inline]
190 pub async fn next_timeout(&mut self, ms: u64) -> Option<Result<BytesMut, Error>> {

Callers 2

next_timeoutMethod · 0.45
new_listenerFunction · 0.45

Calls 1

decMethod · 0.80

Tested by

no test coverage detected