pub struct CaptureModule { /* private fields */ }Expand description
Observer module that mirrors each request into the ring. Holds an Arc to the ring it shares
with the verdict-join layer; the module_factory rebuilds the module on reload but keeps the
same ring, so in-flight captures survive a config reload.
Implementations§
Source§impl CaptureModule
impl CaptureModule
Sourcepub fn new(cfg: &CaptureConfig, ring: Arc<CaptureRing>) -> Self
pub fn new(cfg: &CaptureConfig, ring: Arc<CaptureRing>) -> Self
Build the module from the typed config, sharing ring with the verdict-join layer.
Trait Implementations§
Source§impl WafModule for CaptureModule
impl WafModule for CaptureModule
Source§fn structural(&self) -> bool
fn structural(&self) -> bool
Structural so the content fast-path never skips it (it is not a content rule).
fn id(&self) -> &str
fn phase(&self) -> Phase
Source§fn init(&mut self, _cfg: &Config)
fn init(&mut self, _cfg: &Config)
Called once at startup; compile/init rules here, never in
inspect.Source§fn inspect(&self, ctx: &RequestContext) -> Decision
fn inspect(&self, ctx: &RequestContext) -> Decision
Read-only access to context; pipeline owns mutation of
score.Auto Trait Implementations§
impl Freeze for CaptureModule
impl RefUnwindSafe for CaptureModule
impl Send for CaptureModule
impl Sync for CaptureModule
impl Unpin for CaptureModule
impl UnsafeUnpin for CaptureModule
impl UnwindSafe for CaptureModule
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