Trait haproxy_api::UserFilter 
source · pub trait UserFilter: Sized {
    const METHODS: u8 = 255u8;
    const CONTINUE_IF_ERROR: bool = true;
    // Required method
    fn new(lua: &Lua, args: Table<'_>) -> Result<Self>;
    // Provided methods
    fn start_analyze(
        &mut self,
        lua: &Lua,
        txn: Txn<'_>,
        chn: Channel<'_>
    ) -> Result<FilterResult> { ... }
    fn end_analyze(
        &mut self,
        lua: &Lua,
        txn: Txn<'_>,
        chn: Channel<'_>
    ) -> Result<FilterResult> { ... }
    fn http_headers(
        &mut self,
        lua: &Lua,
        txn: Txn<'_>,
        msg: HttpMessage<'_>
    ) -> Result<FilterResult> { ... }
    fn http_payload(
        &mut self,
        lua: &Lua,
        txn: Txn<'_>,
        msg: HttpMessage<'_>
    ) -> Result<Option<usize>> { ... }
    fn http_end(
        &mut self,
        lua: &Lua,
        txn: Txn<'_>,
        msg: HttpMessage<'_>
    ) -> Result<FilterResult> { ... }
    fn register_data_filter(
        lua: &Lua,
        txn: Txn<'_>,
        chn: Channel<'_>
    ) -> Result<()> { ... }
    fn unregister_data_filter(
        lua: &Lua,
        txn: Txn<'_>,
        chn: Channel<'_>
    ) -> Result<()> { ... }
}Expand description
A trait that defines all required callback functions to implement filters.
Provided Associated Constants§
sourceconst CONTINUE_IF_ERROR: bool = true
 
const CONTINUE_IF_ERROR: bool = true
Continue execution if a filter callback returns an error.
Required Methods§
Provided Methods§
sourcefn start_analyze(
    &mut self,
    lua: &Lua,
    txn: Txn<'_>,
    chn: Channel<'_>
) -> Result<FilterResult>
 
fn start_analyze( &mut self, lua: &Lua, txn: Txn<'_>, chn: Channel<'_> ) -> Result<FilterResult>
Called when the analysis starts on the channel chn.
sourcefn end_analyze(
    &mut self,
    lua: &Lua,
    txn: Txn<'_>,
    chn: Channel<'_>
) -> Result<FilterResult>
 
fn end_analyze( &mut self, lua: &Lua, txn: Txn<'_>, chn: Channel<'_> ) -> Result<FilterResult>
Called when the analysis ends on the channel chn.
sourcefn http_headers(
    &mut self,
    lua: &Lua,
    txn: Txn<'_>,
    msg: HttpMessage<'_>
) -> Result<FilterResult>
 
fn http_headers( &mut self, lua: &Lua, txn: Txn<'_>, msg: HttpMessage<'_> ) -> Result<FilterResult>
Called just before the HTTP payload analysis and after any processing on the HTTP message msg.
sourcefn http_payload(
    &mut self,
    lua: &Lua,
    txn: Txn<'_>,
    msg: HttpMessage<'_>
) -> Result<Option<usize>>
 
fn http_payload( &mut self, lua: &Lua, txn: Txn<'_>, msg: HttpMessage<'_> ) -> Result<Option<usize>>
Called during the HTTP payload analysis on the HTTP message msg.
sourcefn http_end(
    &mut self,
    lua: &Lua,
    txn: Txn<'_>,
    msg: HttpMessage<'_>
) -> Result<FilterResult>
 
fn http_end( &mut self, lua: &Lua, txn: Txn<'_>, msg: HttpMessage<'_> ) -> Result<FilterResult>
Called after the HTTP payload analysis on the HTTP message msg.