pub trait ProviderConnection: Send + Sync {
// Required methods
fn connection_id(&self) -> &str;
fn provider_type(&self) -> ProviderType;
fn display_name(&self) -> &str;
fn capabilities(&self) -> &Capabilities;
fn pull_requests(&self) -> Option<Arc<dyn PullRequestSource>>;
fn work_items(&self) -> Option<Arc<dyn WorkItemSource>>;
fn pipelines(&self) -> Option<Arc<dyn PipelineSource>>;
fn check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn notifications(&self) -> Option<Arc<dyn NotificationSource>> { ... }
fn discover_repositories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RepositoryPage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
A live, authenticated connection exposing only the sources it supports.
Required Methods§
fn connection_id(&self) -> &str
fn provider_type(&self) -> ProviderType
fn display_name(&self) -> &str
fn capabilities(&self) -> &Capabilities
fn pull_requests(&self) -> Option<Arc<dyn PullRequestSource>>
fn work_items(&self) -> Option<Arc<dyn WorkItemSource>>
fn pipelines(&self) -> Option<Arc<dyn PipelineSource>>
Provided Methods§
Sourcefn notifications(&self) -> Option<Arc<dyn NotificationSource>>
fn notifications(&self) -> Option<Arc<dyn NotificationSource>>
The notification feed, when the provider has one. Defaults to None (unsupported).
Sourcefn discover_repositories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RepositoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover_repositories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RepositoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The repositories these credentials can reach, most-recently-active first — the candidate list for the connection’s repository scope picker.
Defaults to empty, which is the right answer for providers that aren’t repo-addressed (Jira is project-addressed, Linear team-addressed). Only the scope picker calls this, so a provider whose discovery is wrong shows an empty picker; it cannot break fetching for a connection that already has a scope.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".