pub struct BrotliFilter { /* private fields */ }Expand description
A Lua filter that applies Brotli compression to HTTP responses.
Trait Implementations§
Source§impl Default for BrotliFilter
impl Default for BrotliFilter
Source§fn default() -> BrotliFilter
fn default() -> BrotliFilter
Returns the “default value” for a type. Read more
Source§impl UserFilter for BrotliFilter
impl UserFilter for BrotliFilter
Source§fn http_headers(
&mut self,
lua: &Lua,
txn: Txn,
msg: HttpMessage,
) -> LuaResult<FilterResult>
fn http_headers( &mut self, lua: &Lua, txn: Txn, msg: HttpMessage, ) -> LuaResult<FilterResult>
Called just before the HTTP payload analysis and after any processing on the HTTP message
msg.Source§fn http_payload(
&mut self,
_: &Lua,
_: Txn,
msg: HttpMessage,
) -> LuaResult<Option<usize>>
fn http_payload( &mut self, _: &Lua, _: Txn, msg: HttpMessage, ) -> LuaResult<Option<usize>>
Called during the HTTP payload analysis on the HTTP message
msg.Source§const CONTINUE_IF_ERROR: bool = true
const CONTINUE_IF_ERROR: bool = true
Continue execution if a filter callback returns an error.
Source§fn start_analyze(
&mut self,
lua: &Lua,
txn: Txn,
chn: Channel,
) -> Result<FilterResult, Error>
fn start_analyze( &mut self, lua: &Lua, txn: Txn, chn: Channel, ) -> Result<FilterResult, Error>
Called when the analysis starts on the channel
chn.Source§fn end_analyze(
&mut self,
lua: &Lua,
txn: Txn,
chn: Channel,
) -> Result<FilterResult, Error>
fn end_analyze( &mut self, lua: &Lua, txn: Txn, chn: Channel, ) -> Result<FilterResult, Error>
Called when the analysis ends on the channel
chn.Source§fn http_end(
&mut self,
lua: &Lua,
txn: Txn,
msg: HttpMessage,
) -> Result<FilterResult, Error>
fn http_end( &mut self, lua: &Lua, txn: Txn, msg: HttpMessage, ) -> Result<FilterResult, Error>
Called after the HTTP payload analysis on the HTTP message
msg.Source§fn register_data_filter(lua: &Lua, txn: Txn, chn: Channel) -> Result<(), Error>
fn register_data_filter(lua: &Lua, txn: Txn, chn: Channel) -> Result<(), Error>
Enable the data filtering on the channel
chn for the current filter.
It may be called at any time from any callback functions proceeding the data analysis.Auto Trait Implementations§
impl Freeze for BrotliFilter
impl RefUnwindSafe for BrotliFilter
impl Send for BrotliFilter
impl Sync for BrotliFilter
impl Unpin for BrotliFilter
impl UnwindSafe for BrotliFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more