Struct bulwark_config::Thresholds
source · pub struct Thresholds {
pub observe_only: bool,
pub restrict: f64,
pub suspicious: f64,
pub trust: f64,
}
Expand description
Configuration for the decision thresholds.
No threshold is necessary for the default allowed
outcome because it is defined by the range between the
suspicious
threshold and the trusted
threshold. The thresholds must have values in descending order, with
restrict
> suspicious
> trusted
. None of the threshold values may be equal.
Fields§
§observe_only: bool
True if the primary service should take no action in response to restrict decisions.
restrict: f64
Any decision value above the restrict
threshold will cause the corresponding request to be blocked.
suspicious: f64
Any decision value above the suspicious
threshold will cause the corresponding request to be flagged as
suspicious but it will still be allowed.
trust: f64
Any decision value below the trust
threshold will cause the corresponding request to be flagged as trusted.
This primarily affects plugins which use feedback loops.
Trait Implementations§
source§impl Clone for Thresholds
impl Clone for Thresholds
source§fn clone(&self) -> Thresholds
fn clone(&self) -> Thresholds
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Thresholds
impl Debug for Thresholds
impl Copy for Thresholds
Auto Trait Implementations§
impl Freeze for Thresholds
impl RefUnwindSafe for Thresholds
impl Send for Thresholds
impl Sync for Thresholds
impl Unpin for Thresholds
impl UnwindSafe for Thresholds
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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