Skip to main content

ObjectVisitor

Trait ObjectVisitor 

Source
pub trait ObjectVisitor {
    // Required methods
    fn visit(&mut self, type_name: &str, value: &[u8]) -> Result<bool, Error>;
    fn skip(&mut self) -> Result<bool, Error>;
}
Expand description

Receives objects decoded from a block payload, in payload order.

Required Methods§

Source

fn visit(&mut self, type_name: &str, value: &[u8]) -> Result<bool, Error>

value is the JSONB encoding of one object. Returns false to stop iteration.

Source

fn skip(&mut self) -> Result<bool, Error>

Consumes an ordinal without emitting a row (a payload entry the decoder recognizes but cannot represent). Keeps object_index aligned with the block’s true ordinals. Returns false to stop iteration.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§