Trait QueryHook

Source
pub trait QueryHook {
    // Required method
    fn handle(
        &self,
        incoming: Query,
        responses: Box<dyn ResponseStream>,
    ) -> bool;
}

Required Methods§

Source

fn handle(&self, incoming: Query, responses: Box<dyn ResponseStream>) -> bool

Handle an incoming query. If the query is considered malformed or malicious, return false. If the query is valid, return true. Valid queries with no results should still return true, and the response object should be dropped.

Implementors§