Skip to main content

AnalyticsPlugin

Trait AnalyticsPlugin 

Source
pub trait AnalyticsPlugin: Plugin {
    // Required methods
    fn query_issues(
        &mut self,
        query: &AnalyticsQuery,
    ) -> PluginResult<Vec<Issue>>;
    fn compute_metric(
        &mut self,
        metric: MetricType,
        range: &DateRange,
    ) -> PluginResult<MetricValue>;
    fn generate_report(
        &mut self,
        report_type: ReportType,
        range: &DateRange,
    ) -> PluginResult<Report>;
    fn export(
        &mut self,
        format: ExportFormat,
        query: &AnalyticsQuery,
    ) -> PluginResult<Vec<u8>>;

    // Provided methods
    fn available_metrics(&self) -> Vec<MetricType> { ... }
    fn available_reports(&self) -> Vec<ReportType> { ... }
    fn available_formats(&self) -> Vec<ExportFormat> { ... }
    fn get_snapshots(
        &mut self,
        _range: &DateRange,
    ) -> PluginResult<Vec<IssueSnapshot>> { ... }
    fn get_transitions(
        &mut self,
        _range: &DateRange,
    ) -> PluginResult<Vec<StatusTransition>> { ... }
    fn get_sprints(&mut self) -> PluginResult<Vec<Sprint>> { ... }
}
Expand description

Trait for plugins that compute metrics, generate reports, or export data

Required Methods§

Source

fn query_issues(&mut self, query: &AnalyticsQuery) -> PluginResult<Vec<Issue>>

Query issues with filters

Returns issues matching the query parameters.

Source

fn compute_metric( &mut self, metric: MetricType, range: &DateRange, ) -> PluginResult<MetricValue>

Compute a specific metric

Calculates the requested metric for the given date range.

Source

fn generate_report( &mut self, report_type: ReportType, range: &DateRange, ) -> PluginResult<Report>

Generate a report

Creates a full report of the requested type for the given date range.

Source

fn export( &mut self, format: ExportFormat, query: &AnalyticsQuery, ) -> PluginResult<Vec<u8>>

Export data in specified format

Exports filtered data in the requested format. Returns raw bytes.

Provided Methods§

Source

fn available_metrics(&self) -> Vec<MetricType>

Get available metrics

Returns list of metrics this plugin can compute.

Source

fn available_reports(&self) -> Vec<ReportType>

Get available report types

Returns list of reports this plugin can generate.

Source

fn available_formats(&self) -> Vec<ExportFormat>

Get available export formats

Returns list of export formats this plugin supports.

Source

fn get_snapshots( &mut self, _range: &DateRange, ) -> PluginResult<Vec<IssueSnapshot>>

Get historical snapshots

Returns historical issue snapshots for trend analysis.

Source

fn get_transitions( &mut self, _range: &DateRange, ) -> PluginResult<Vec<StatusTransition>>

Get status transitions

Returns status transition history for cycle time analysis.

Source

fn get_sprints(&mut self) -> PluginResult<Vec<Sprint>>

Get sprint definitions

Returns sprint information for sprint-based reports.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§