MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / skip

Method skip

crates/commitlog/src/payload/txdata.rs:216–242  ·  view source on GitHub ↗
(visitor: &mut V, reader: &mut R)

Source from the content-addressed store, hash-verified

214 }
215
216 pub fn skip<'a, V, R>(visitor: &mut V, reader: &mut R) -> Result<(), V::Error>
217 where
218 V: Visitor<Row = T>,
219 R: BufReader<'a>,
220 {
221 let flags = Flags::from_bits_retain(reader.get_u8()?);
222
223 // If the flags indicate that the payload contains `Inputs`,
224 // try to decode them.
225 if flags.contains(Flags::HAVE_INPUTS) {
226 Inputs::decode(reader)?;
227 }
228
229 // If the flags indicate that the payload contains `Outputs`,
230 // try to decode them.
231 if flags.contains(Flags::HAVE_OUTPUTS) {
232 Outputs::decode(reader)?;
233 }
234
235 // If the flags indicate that the payload contains `Mutations`,
236 // try to consume them (i.e. decode but don't allocate).
237 if flags.contains(Flags::HAVE_MUTATIONS) {
238 Mutations::skip(visitor, reader)?;
239 }
240
241 Ok(())
242 }
243}
244
245/// The inputs of a transaction, i.e. the name and arguments of a reducer call.

Callers 14

diff_pathsFunction · 0.80
assert_host_typeFunction · 0.80
project_viewsFunction · 0.80
project_anonymous_viewsFunction · 0.80
running_from_target_dirFunction · 0.80
execFunction · 0.80
retain_rangeFunction · 0.80
reducer_implFunction · 0.80
procedure_implFunction · 0.80
running_from_target_dirFunction · 0.80
test_partly_identicalFunction · 0.80

Calls 8

decodeFunction · 0.85
decode_varintFunction · 0.85
get_u8Method · 0.80
get_u32Method · 0.80
OkFunction · 0.50
containsMethod · 0.45
mapMethod · 0.45
skip_rowMethod · 0.45

Tested by 3

assert_host_typeFunction · 0.64
test_partly_identicalFunction · 0.64
read_logsFunction · 0.64