pub struct BlockedRatioSlo {
pub target_class: TargetClass,
pub acceptable: f64,
pub warning: f64,
pub critical: f64,
}Expand description
Blocked ratio service-level objectives (SLOs) by target class.
Defines acceptable and concerning block ratios for different target types. These thresholds guide requirement inference and risk scoring.
Fields§
§target_class: TargetClassTarget class for these SLOs.
acceptable: f64Acceptable block ratio (green threshold); below this is normal.
warning: f64Warning threshold; above this triggers adaptive rate requirement.
critical: f64Critical threshold; above this indicates severe anti-bot posture.
Implementations§
Source§impl BlockedRatioSlo
impl BlockedRatioSlo
Sourcepub const fn api() -> Self
pub const fn api() -> Self
Default SLOs for API targets (0-5% blocks, 10% warning, 15% critical).
Sourcepub const fn content_site() -> Self
pub const fn content_site() -> Self
Default SLOs for content sites (0-15% blocks, 25% warning, 40% critical).
Sourcepub const fn high_security() -> Self
pub const fn high_security() -> Self
Default SLOs for high-security sites (0-30% blocks, 50% warning, 70% critical).
Sourcepub const fn unknown() -> Self
pub const fn unknown() -> Self
Default SLOs for unknown targets (conservative: API thresholds).
Sourcepub const fn for_class(class: TargetClass) -> Self
pub const fn for_class(class: TargetClass) -> Self
Get SLO for a target class.
Trait Implementations§
Source§impl Clone for BlockedRatioSlo
impl Clone for BlockedRatioSlo
Source§fn clone(&self) -> BlockedRatioSlo
fn clone(&self) -> BlockedRatioSlo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockedRatioSlo
impl Debug for BlockedRatioSlo
Source§impl<'de> Deserialize<'de> for BlockedRatioSlo
impl<'de> Deserialize<'de> for BlockedRatioSlo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BlockedRatioSlo
impl PartialEq for BlockedRatioSlo
Source§impl Serialize for BlockedRatioSlo
impl Serialize for BlockedRatioSlo
impl StructuralPartialEq for BlockedRatioSlo
Auto Trait Implementations§
impl Freeze for BlockedRatioSlo
impl RefUnwindSafe for BlockedRatioSlo
impl Send for BlockedRatioSlo
impl Sync for BlockedRatioSlo
impl Unpin for BlockedRatioSlo
impl UnsafeUnpin for BlockedRatioSlo
impl UnwindSafe for BlockedRatioSlo
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