pub struct ReputationModule { /* private fields */ }Expand description
A premium WafModule that scores a request by the reputation of its client IP.
Implementations§
Source§impl ReputationModule
impl ReputationModule
Sourcepub fn new(store: Arc<dyn ReputationStore>, cfg: ReputationConfig) -> Self
pub fn new(store: Arc<dyn ReputationStore>, cfg: ReputationConfig) -> Self
Fully configured at construction: the core Config carries no reputation fields, so the
enterprise wiring builds this from [enterprise.reputation] and init() is a no-op.
Trait Implementations§
Source§impl WafModule for ReputationModule
impl WafModule for ReputationModule
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.Source§fn structural(&self) -> bool
fn structural(&self) -> bool
true for a STRUCTURAL inspection module (e.g. GraphQL) whose decision does
NOT come from a content-rule match. The content fast-path (Pillar 3) may prove
“no content rule can match” and skip CONTENT inspection — but it cannot prove
a structural module is inert, so structural modules run even on the skip path.
Default false (a content module, gated by the fast-path).Auto Trait Implementations§
impl !RefUnwindSafe for ReputationModule
impl !UnwindSafe for ReputationModule
impl Freeze for ReputationModule
impl Send for ReputationModule
impl Sync for ReputationModule
impl Unpin for ReputationModule
impl UnsafeUnpin for ReputationModule
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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