pub trait TrackerAdapter {
// Required methods
fn tool(&self) -> Tool;
fn create_issue(
&mut self,
title: &str,
body: &str,
labels: &[String],
assignee: Option<&str>,
priority: Option<&str>,
status: &str,
) -> Result<String>;
fn update_issue(
&mut self,
remote_ref: &str,
title: &str,
body: &str,
labels: &[String],
assignee: Option<&str>,
priority: Option<&str>,
status: &str,
) -> Result<()>;
fn mark_done(&mut self, remote_ref: &str) -> Result<()>;
fn list_open(&mut self) -> Result<Vec<RemoteIssue>>;
fn done_via_status(&self) -> bool;
}Expand description
Common surface both tracker adapters implement so the orchestration is tool-agnostic.
status is the remote state/label already computed by the pure mapping
helpers (e.g. closed, Done, or the first work column). GitLab conveys
“done” via a separate close call (TrackerAdapter::mark_done); Linear
sends --status Done directly (TrackerAdapter::done_via_status).
Required Methods§
fn tool(&self) -> Tool
Sourcefn create_issue(
&mut self,
title: &str,
body: &str,
labels: &[String],
assignee: Option<&str>,
priority: Option<&str>,
status: &str,
) -> Result<String>
fn create_issue( &mut self, title: &str, body: &str, labels: &[String], assignee: Option<&str>, priority: Option<&str>, status: &str, ) -> Result<String>
Create a remote issue and return its remote id (GitLab iid, Linear
identifier).
Sourcefn update_issue(
&mut self,
remote_ref: &str,
title: &str,
body: &str,
labels: &[String],
assignee: Option<&str>,
priority: Option<&str>,
status: &str,
) -> Result<()>
fn update_issue( &mut self, remote_ref: &str, title: &str, body: &str, labels: &[String], assignee: Option<&str>, priority: Option<&str>, status: &str, ) -> Result<()>
Update an existing remote issue in place.
Sourcefn mark_done(&mut self, remote_ref: &str) -> Result<()>
fn mark_done(&mut self, remote_ref: &str) -> Result<()>
Convey “done” (GitLab: issue close <id>). Only invoked when
done_via_status is false.
Sourcefn list_open(&mut self) -> Result<Vec<RemoteIssue>>
fn list_open(&mut self) -> Result<Vec<RemoteIssue>>
List open remote issues (the import source). Closed/done issues are excluded.
Sourcefn done_via_status(&self) -> bool
fn done_via_status(&self) -> bool
Linear sets done through the status flag; GitLab needs a separate close call.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".