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;
fn set_relations(
&mut self,
remote_ref: &str,
relations: &[MappedRelation],
) -> Result<()>;
}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.
Sourcefn set_relations(
&mut self,
remote_ref: &str,
relations: &[MappedRelation],
) -> Result<()>
fn set_relations( &mut self, remote_ref: &str, relations: &[MappedRelation], ) -> Result<()>
Send the relationships this tracker can express, after the issue itself exists (WP07 T030/T031).
Required, not defaulted. A default no-op would let a tracker be added that silently never syncs relationships — the failure mode is a local relation that appears to sync and does not, which is the same silent-loss shape as a dropped edge. Two implementors is a small price for making the omission a compile error.
The relationships arrive already filtered by
map_relation_to_remote, so an adapter never decides representability:
it sends what the shared seam says it can send, and reports the rest. A
blocks edge reaches here; a related edge never does.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".