pub trait LogQueryInterceptor {
type Error: ErrorExt;
// Provided methods
fn pre_query(
&self,
_query: &LogQuery,
_query_ctx: QueryContextRef,
) -> Result<(), Self::Error> { ... }
fn post_query(
&self,
output: Output,
_query_ctx: QueryContextRef,
) -> Result<Output, Self::Error> { ... }
}
Expand description
LogQueryInterceptor can track life cycle of a log query request and customize or abort its execution at given point.
Required Associated Types§
Provided Methods§
sourcefn pre_query(
&self,
_query: &LogQuery,
_query_ctx: QueryContextRef,
) -> Result<(), Self::Error>
fn pre_query( &self, _query: &LogQuery, _query_ctx: QueryContextRef, ) -> Result<(), Self::Error>
Called before query is actually executed.
sourcefn post_query(
&self,
output: Output,
_query_ctx: QueryContextRef,
) -> Result<Output, Self::Error>
fn post_query( &self, output: Output, _query_ctx: QueryContextRef, ) -> Result<Output, Self::Error>
Called after execution finished. The implementation can modify the output if needed.