pub struct SecurityManager { /* private fields */ }Implementations§
Source§impl SecurityManager
impl SecurityManager
pub fn new() -> Self
pub async fn is_ip_banned(&self, ip: &str) -> bool
pub async fn record_request(&self, ip: &str) -> Result<(), &'static str>
pub async fn record_auth_failure(&self, ip: &str, username_or_email: &str)
pub async fn record_auth_success(&self, ip: &str)
pub async fn ban_ip(&self, ip: &str, duration_minutes: u64)
pub async fn unblock_ip(&self, ip: &str) -> bool
pub async fn get_summary(&self) -> SecurityTelemetrySummary
Auto Trait Implementations§
impl !Freeze for SecurityManager
impl !RefUnwindSafe for SecurityManager
impl Send for SecurityManager
impl Sync for SecurityManager
impl Unpin for SecurityManager
impl UnsafeUnpin for SecurityManager
impl UnwindSafe for SecurityManager
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