pub trait TapeVisitor<'a> {
type Output;
// Required methods
fn visit_null(&mut self) -> Result<Self::Output>;
fn visit_bool(&mut self, v: bool) -> Result<Self::Output>;
fn visit_i64(&mut self, v: i64) -> Result<Self::Output>;
fn visit_u64(&mut self, v: u64) -> Result<Self::Output>;
fn visit_f64(&mut self, v: f64) -> Result<Self::Output>;
fn visit_str(&mut self, s: &'a str) -> Result<Self::Output>;
fn visit_array(
&mut self,
tape: &mut TapeRef<'a>,
end_idx: usize,
) -> Result<Self::Output>;
fn visit_object(
&mut self,
tape: &mut TapeRef<'a>,
end_idx: usize,
) -> Result<Self::Output>;
}Expand description
Callback-based visitor interface for the simdjson tape.
Implement this trait to build custom data structures from the tape without
allocating intermediate Value nodes.
Required Associated Types§
Required Methods§
fn visit_null(&mut self) -> Result<Self::Output>
fn visit_bool(&mut self, v: bool) -> Result<Self::Output>
fn visit_i64(&mut self, v: i64) -> Result<Self::Output>
fn visit_u64(&mut self, v: u64) -> Result<Self::Output>
fn visit_f64(&mut self, v: f64) -> Result<Self::Output>
Sourcefn visit_str(&mut self, s: &'a str) -> Result<Self::Output>
fn visit_str(&mut self, s: &'a str) -> Result<Self::Output>
Visit a string value. The s borrow is tied to the tape lifetime 'a.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".