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§
Sourcefn query_issues(&mut self, query: &AnalyticsQuery) -> PluginResult<Vec<Issue>>
fn query_issues(&mut self, query: &AnalyticsQuery) -> PluginResult<Vec<Issue>>
Query issues with filters
Returns issues matching the query parameters.
Sourcefn compute_metric(
&mut self,
metric: MetricType,
range: &DateRange,
) -> PluginResult<MetricValue>
fn compute_metric( &mut self, metric: MetricType, range: &DateRange, ) -> PluginResult<MetricValue>
Compute a specific metric
Calculates the requested metric for the given date range.
Sourcefn generate_report(
&mut self,
report_type: ReportType,
range: &DateRange,
) -> PluginResult<Report>
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.
Sourcefn export(
&mut self,
format: ExportFormat,
query: &AnalyticsQuery,
) -> PluginResult<Vec<u8>>
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§
Sourcefn available_metrics(&self) -> Vec<MetricType>
fn available_metrics(&self) -> Vec<MetricType>
Get available metrics
Returns list of metrics this plugin can compute.
Sourcefn available_reports(&self) -> Vec<ReportType>
fn available_reports(&self) -> Vec<ReportType>
Get available report types
Returns list of reports this plugin can generate.
Sourcefn available_formats(&self) -> Vec<ExportFormat>
fn available_formats(&self) -> Vec<ExportFormat>
Get available export formats
Returns list of export formats this plugin supports.
Sourcefn get_snapshots(
&mut self,
_range: &DateRange,
) -> PluginResult<Vec<IssueSnapshot>>
fn get_snapshots( &mut self, _range: &DateRange, ) -> PluginResult<Vec<IssueSnapshot>>
Get historical snapshots
Returns historical issue snapshots for trend analysis.
Sourcefn get_transitions(
&mut self,
_range: &DateRange,
) -> PluginResult<Vec<StatusTransition>>
fn get_transitions( &mut self, _range: &DateRange, ) -> PluginResult<Vec<StatusTransition>>
Get status transitions
Returns status transition history for cycle time analysis.
Sourcefn get_sprints(&mut self) -> PluginResult<Vec<Sprint>>
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".