MCPcopy Create free account
hub / github.com/apache/arrow-rs / on_decoder

Method on_decoder

arrow-avro/src/reader/record.rs:2080–2092  ·  view source on GitHub ↗
(&mut self, fallback_idx: usize, action: F)

Source from the content-addressed store, hash-verified

2078
2079 #[inline]
2080 fn on_decoder<F>(&mut self, fallback_idx: usize, action: F) -> Result<(), AvroError>
2081 where
2082 F: FnOnce(&mut Decoder) -> Result<(), AvroError>,
2083 {
2084 if let UnionReadPlan::ToSingle { target, .. } = &mut self.plan {
2085 return action(target);
2086 }
2087 let reader_idx = match &self.plan {
2088 UnionReadPlan::FromSingle { reader_idx, .. } => *reader_idx,
2089 _ => fallback_idx,
2090 };
2091 self.branches.emit_to(reader_idx).and_then(action)
2092 }
2093
2094 fn append_null(&mut self) -> Result<(), AvroError> {
2095 self.on_decoder(self.null_emit_idx, |decoder| decoder.append_null())

Callers 2

append_nullMethod · 0.80
append_defaultMethod · 0.80

Calls 2

and_thenMethod · 0.80
emit_toMethod · 0.80

Tested by

no test coverage detected