pub enum BehaviorAction {
Ban {
duration: u64,
},
Note {
action: String,
},
LoggedOnly,
}Expand description
What apply_action decided for one tripped rule: the observable part
of the reference BehaviorActionDispatchMixin.
Variants§
Ban
The active-mode ban: hold the IP for this many seconds (the rule’s
ban_duration, else the reference 3600s default).
Note
alert, log, and throttle reduce to an observable note today,
exactly like the go port: the reference logs at the suspicious
level and (for alert) critical, which this port does not model.
LoggedOnly
Passive mode never executes the action: the reference logs
[PASSIVE MODE] lines only, so no ban is ever recorded.
Implementations§
Trait Implementations§
Source§impl Clone for BehaviorAction
impl Clone for BehaviorAction
Source§impl Debug for BehaviorAction
impl Debug for BehaviorAction
impl Eq for BehaviorAction
Source§impl PartialEq for BehaviorAction
impl PartialEq for BehaviorAction
impl StructuralPartialEq for BehaviorAction
Auto Trait Implementations§
impl Freeze for BehaviorAction
impl RefUnwindSafe for BehaviorAction
impl Send for BehaviorAction
impl Sync for BehaviorAction
impl Unpin for BehaviorAction
impl UnsafeUnpin for BehaviorAction
impl UnwindSafe for BehaviorAction
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.