pub trait NetBlockProcessor {
// Required methods
fn on_connection_begin(
&mut self,
event_id: i64,
time: i64,
connection_name: &str,
is_outgoing: bool,
) -> Result<bool, Error>;
fn on_connection_end(
&mut self,
event_id: i64,
time: i64,
bit_size: i64,
) -> Result<bool, Error>;
fn on_object_begin(
&mut self,
event_id: i64,
time: i64,
object_name: &str,
) -> Result<bool, Error>;
fn on_object_end(
&mut self,
event_id: i64,
time: i64,
bit_size: i64,
) -> Result<bool, Error>;
fn on_property(
&mut self,
event_id: i64,
time: i64,
property_name: &str,
bit_size: i64,
) -> Result<bool, Error>;
fn on_rpc_begin(
&mut self,
event_id: i64,
time: i64,
function_name: &str,
) -> Result<bool, Error>;
fn on_rpc_end(
&mut self,
event_id: i64,
time: i64,
bit_size: i64,
) -> Result<bool, Error>;
}Expand description
A trait for processing network tracing event blocks.
Implementors receive one callback per decoded net event. Returning Ok(true)
continues iteration; returning Ok(false) stops parsing the current block.
The string arguments borrow the per-block parse arena; an implementor that retains them across blocks (e.g. an open-span stack) must copy them out.
Required Methods§
fn on_connection_begin( &mut self, event_id: i64, time: i64, connection_name: &str, is_outgoing: bool, ) -> Result<bool, Error>
fn on_connection_end( &mut self, event_id: i64, time: i64, bit_size: i64, ) -> Result<bool, Error>
fn on_object_begin( &mut self, event_id: i64, time: i64, object_name: &str, ) -> Result<bool, Error>
fn on_object_end( &mut self, event_id: i64, time: i64, bit_size: i64, ) -> Result<bool, Error>
fn on_property( &mut self, event_id: i64, time: i64, property_name: &str, bit_size: i64, ) -> Result<bool, Error>
fn on_rpc_begin( &mut self, event_id: i64, time: i64, function_name: &str, ) -> Result<bool, Error>
fn on_rpc_end( &mut self, event_id: i64, time: i64, bit_size: i64, ) -> Result<bool, Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".