pub struct AnalyticsManager { /* private fields */ }
Expand description
Main analytics manager
Implementations§
Source§impl AnalyticsManager
impl AnalyticsManager
Sourcepub fn new(config: AnalyticsConfig) -> Self
pub fn new(config: AnalyticsConfig) -> Self
Create new analytics manager
Sourcepub async fn record_event(
&mut self,
event: AnalyticsEvent,
) -> Result<(), AnalyticsError>
pub async fn record_event( &mut self, event: AnalyticsEvent, ) -> Result<(), AnalyticsError>
Record an analytics event
Sourcepub async fn get_role_usage_stats(
&self,
_role_id: Option<&str>,
_time_range: Option<TimeRange>,
) -> Result<Vec<RoleUsageStats>, AnalyticsError>
pub async fn get_role_usage_stats( &self, _role_id: Option<&str>, _time_range: Option<TimeRange>, ) -> Result<Vec<RoleUsageStats>, AnalyticsError>
Get role usage statistics
Sourcepub async fn get_permission_usage_stats(
&self,
_permission_id: Option<&str>,
_time_range: Option<TimeRange>,
) -> Result<Vec<PermissionUsageStats>, AnalyticsError>
pub async fn get_permission_usage_stats( &self, _permission_id: Option<&str>, _time_range: Option<TimeRange>, ) -> Result<Vec<PermissionUsageStats>, AnalyticsError>
Get permission usage statistics
Sourcepub async fn get_compliance_metrics(
&self,
_time_range: Option<TimeRange>,
) -> Result<ComplianceMetrics, AnalyticsError>
pub async fn get_compliance_metrics( &self, _time_range: Option<TimeRange>, ) -> Result<ComplianceMetrics, AnalyticsError>
Get compliance metrics
Sourcepub async fn get_performance_metrics(
&self,
_time_range: Option<TimeRange>,
) -> Result<PerformanceMetrics, AnalyticsError>
pub async fn get_performance_metrics( &self, _time_range: Option<TimeRange>, ) -> Result<PerformanceMetrics, AnalyticsError>
Get performance metrics
Sourcepub async fn get_trend_analysis(
&self,
metric_name: &str,
_time_range: TimeRange,
) -> Result<TrendAnalysis, AnalyticsError>
pub async fn get_trend_analysis( &self, metric_name: &str, _time_range: TimeRange, ) -> Result<TrendAnalysis, AnalyticsError>
Get trend analysis for a specific metric
Sourcepub async fn generate_report(
&self,
report_type: ReportType,
time_range: TimeRange,
) -> Result<AnalyticsReport, AnalyticsError>
pub async fn generate_report( &self, report_type: ReportType, time_range: TimeRange, ) -> Result<AnalyticsReport, AnalyticsError>
Generate comprehensive analytics report
Auto Trait Implementations§
impl Freeze for AnalyticsManager
impl RefUnwindSafe for AnalyticsManager
impl Send for AnalyticsManager
impl Sync for AnalyticsManager
impl Unpin for AnalyticsManager
impl UnwindSafe for AnalyticsManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>
Converts
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>
Converts
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