pub struct ShieldConfig {
pub enabled: bool,
pub update_interval_ms: u64,
pub detailed_stats: bool,
pub color: bool,
}Expand description
Shield display configuration
The shield provides visual feedback about security status:
- ๐ข Green: Normal operation, no threats
- ๐ฃ Purple: Enhanced mode active (better detection)
- ๐ด Red: Active threat detected
- โซ Gray: Disabled or error state
While not a security feature itself, the shield aids in:
- Real-time threat awareness
- System health monitoring
- Security posture visualization
Fieldsยง
ยงenabled: boolEnable shield display
Default: false (no visual output) Security: No direct impact, but helps operators monitor security status. Useful for development and attended deployments.
update_interval_ms: u64Update interval in milliseconds
Default: 1000ms (1 second) Performance: Lower values provide more responsive feedback but use more CPU. Range: 100-10000ms (recommend 500-2000ms)
detailed_stats: boolShow detailed statistics
Default: false (basic display only) Security: Shows threat counts, types, and neutralization stats. Helpful for understanding attack patterns in real-time.
color: boolEnable color output
Default: true (colored output) Accessibility: Set to false for screen readers or monochrome terminals. Colors help quickly identify security state changes.
Trait Implementationsยง
Sourceยงimpl Clone for ShieldConfig
impl Clone for ShieldConfig
Sourceยงfn clone(&self) -> ShieldConfig
fn clone(&self) -> ShieldConfig
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for ShieldConfig
impl Debug for ShieldConfig
Sourceยงimpl Default for ShieldConfig
impl Default for ShieldConfig
Sourceยงimpl<'de> Deserialize<'de> for ShieldConfig
impl<'de> Deserialize<'de> for ShieldConfig
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>,
Auto Trait Implementationsยง
impl Freeze for ShieldConfig
impl RefUnwindSafe for ShieldConfig
impl Send for ShieldConfig
impl Sync for ShieldConfig
impl Unpin for ShieldConfig
impl UnwindSafe for ShieldConfig
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ยง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>
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