Skip to main content

ForgeKind

Trait ForgeKind 

Source
pub trait ForgeKind: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn name(&self) -> &str;
    fn client(&self, http: Client, account: &Credentials) -> Box<dyn Forge>;

    // Provided method
    fn default_url(&self) -> Option<&str> { ... }
}
Expand description

A kind of code host a plugin serves (contributes.forges).

Required Methods§

Source

fn id(&self) -> &str

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

Source

fn name(&self) -> &str

Its name, as the user reads it (GitHub).

Source

fn client(&self, http: Client, account: &Credentials) -> Box<dyn Forge>

The client of one account.

Provided Methods§

Source

fn default_url(&self) -> Option<&str>

Its public instance (https://github.com), the account’s when the call names none.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§