Enum clog::LinkStyle [] [src]

pub enum LinkStyle {
    Github,
    Gitlab,
    Stash,
}

Variants

Github
Gitlab
Stash

Methods

impl LinkStyle

fn variants() -> Vec<&'static str>

impl LinkStyle

Gets a link to an issue in the specified format.

Example

let link = LinkStyle::Github;
let issue = link.issue_link("141", "https://github.com/thoughtram/clog");
assert_eq!("[#141](https://github.com/thoughtram/clog/issues/141", issue);

Gets a link to an commit in the specified format.

Example

let link = LinkStyle::Github;
let commit = link.commit_link("123abc891234567890abcdefabc4567898724", "https://github.com/thoughtram/clog");
assert_eq!("[#123abc89](https://github.com/thoughtram/clog/commit/123abc891234567890abcdefabc4567898724", commit);

Trait Implementations

impl FromStr for LinkStyle

type Err = String

fn from_str(s: &str) -> Result<Self, Self::Err>

impl Display for LinkStyle

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Debug for LinkStyle

fn fmt(&self, __arg_0: &mut Formatter) -> Result