pub struct Context { /* private fields */ }
Expand description
A WAF Context that can be used to evaluate the configured ruleset against address data.
This is obtained by calling Handle::new_context
, and a given Context
should only
be used to handle data for a single request.
Implementations§
Source§impl Context
impl Context
Sourcepub fn run(
&mut self,
persistent_data: Option<WafMap>,
ephemeral_data: Option<&WafMap>,
timeout: Duration,
) -> Result<RunResult, RunError>
pub fn run( &mut self, persistent_data: Option<WafMap>, ephemeral_data: Option<&WafMap>, timeout: Duration, ) -> Result<RunResult, RunError>
Evaluates the configured ruleset against the provided address data, and returns the result of this evaluation.
§Errors
Returns an error if the WAF encountered an internal error, invalid object, or invalid argument while processing the request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Unpin for Context
impl UnwindSafe for Context
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