pub struct AnalyticsMiddleware { /* private fields */ }Expand description
Middleware that automatically records analytics for all requests
§Example
ⓘ
use armature_analytics::{Analytics, AnalyticsMiddleware, AnalyticsConfig};
use armature_core::Application;
let analytics = Analytics::new(AnalyticsConfig::default());
let app = Application::new(container, router)
.middleware(AnalyticsMiddleware::new(analytics.clone()));Implementations§
Trait Implementations§
Source§impl Clone for AnalyticsMiddleware
impl Clone for AnalyticsMiddleware
Source§fn clone(&self) -> AnalyticsMiddleware
fn clone(&self) -> AnalyticsMiddleware
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Middleware for AnalyticsMiddleware
impl Middleware for AnalyticsMiddleware
Auto Trait Implementations§
impl !RefUnwindSafe for AnalyticsMiddleware
impl !UnwindSafe for AnalyticsMiddleware
impl Freeze for AnalyticsMiddleware
impl Send for AnalyticsMiddleware
impl Sync for AnalyticsMiddleware
impl Unpin for AnalyticsMiddleware
impl UnsafeUnpin for AnalyticsMiddleware
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging