pub struct StatsManager { /* private fields */ }
Expand description
Gestionnaire de statistiques thread-safe pour le serveur web
Implementations§
Source§impl StatsManager
impl StatsManager
Sourcepub fn get_stats(&self) -> ServerStats
pub fn get_stats(&self) -> ServerStats
Récupère une copie des statistiques actuelles
Sourcepub fn increment_request_count(&self)
pub fn increment_request_count(&self)
Incrémente le compteur total de requêtes
Sourcepub fn increment_error_count(&self, status_code: &str)
pub fn increment_error_count(&self, status_code: &str)
Incrémente le compteur pour un code d’erreur spécifique
§Arguments
status_code
- Le code de statut HTTP (ex: “404 Not Found”)
Auto Trait Implementations§
impl Freeze for StatsManager
impl RefUnwindSafe for StatsManager
impl Send for StatsManager
impl Sync for StatsManager
impl Unpin for StatsManager
impl UnwindSafe for StatsManager
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