Skip to main content

SourceKind

Trait SourceKind 

Source
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§

Source

fn id(&self) -> &str

Its id, as the core names it (github).

Source

fn name(&self) -> &str

Source

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§

Source

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".

Implementors§