pub trait SourceKind: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn name(&self) -> &str;
fn client(
&self,
http: Client,
account: &Credentials,
) -> Box<dyn TicketSource>;
// Provided method
fn account_name(&self, url: &str) -> String { ... }
}Expand description
A kind of source a plugin serves (contributes.ticketSources).
Required Methods§
fn name(&self) -> &str
Sourcefn client(&self, http: Client, account: &Credentials) -> Box<dyn TicketSource>
fn client(&self, http: Client, account: &Credentials) -> Box<dyn TicketSource>
The client of one account (url: the instance of a code host’s account; empty for a source’s own).
Provided Methods§
Sourcefn account_name(&self, url: &str) -> String
fn account_name(&self, url: &str) -> String
The name of the account’s secret (account:<name>) when the instance is url: by default its host, else the
source’s own id. A source whose instance is only an address typed by the user (Jira’s site) keeps its own id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".