MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / next

Method next

src/avro/src/reader.rs:153–168  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

151 type Item = Result<Block, AvroError>;
152
153 fn next(&mut self) -> Option<Self::Item> {
154 assert!(self.inner.is_empty());
155
156 match self.inner.read_block_next() {
157 Ok(()) => {
158 if self.inner.is_empty() {
159 None
160 } else {
161 let bytes = std::mem::take(&mut self.inner.buf);
162 let len = std::mem::take(&mut self.inner.messages_remaining);
163 Some(Ok(Block { bytes, len }))
164 }
165 }
166 Err(e) => Some(Err(e)),
167 }
168 }
169}
170
171impl<R: AvroRead> Reader<R> {

Callers 5

resolve_claim_pathFunction · 0.45
listMethod · 0.45
readMethod · 0.45
from_partsMethod · 0.45
make_validMethod · 0.45

Calls 5

takeFunction · 0.85
read_block_nextMethod · 0.80
read_nextMethod · 0.80
is_emptyMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected