MCPcopy Create free account
hub / github.com/hashintel/hash / discard

Method discard

libs/@local/harpc/wire-protocol/src/codec/buffer.rs:119–127  ·  view source on GitHub ↗
(&mut self, count: usize)

Source from the content-addressed store, hash-verified

117 }
118
119 pub(crate) fn discard(&mut self, count: usize) -> Result<(), Report<BufferError>> {
120 if self.0.remaining() < count {
121 return Err(Report::new(BufferError::EarlyEndOfStream));
122 }
123
124 self.0.advance(count);
125
126 Ok(())
127 }
128}
129
130impl<B> Buffer<'_, B>

Callers 6

decodeMethod · 0.80
decodeMethod · 0.80
nextFunction · 0.80
next_eofFunction · 0.80
decodeMethod · 0.80
decodeMethod · 0.80

Calls 3

ErrInterface · 0.85
OkInterface · 0.85
advanceMethod · 0.45

Tested by 2

nextFunction · 0.64
next_eofFunction · 0.64