Enum clog::LinkStyle
[−]
[src]
pub enum LinkStyle { Github, Gitlab, Stash, Cgit, }
Variants
Github
Gitlab
Stash
Cgit
Methods
impl LinkStyle
[src]
impl LinkStyle
[src]
fn issue_link<S: AsRef<str>>(&self, issue: S, repo: S) -> String
Gets a hyperlink url 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!("https://github.com/thoughtram/clog/issues/141", issue);
fn commit_link<S: AsRef<str>>(&self, hash: S, repo: S) -> String
Gets a hyperlink url to a commit in the specified format.
Example
let link = LinkStyle::Github; let commit = link.commit_link("123abc891234567890abcdefabc4567898724", "https://github.com/thoughtram/clog"); assert_eq!("https://github.com/thoughtram/clog/commit/123abc891234567890abcdefabc4567898724", commit);
Trait Implementations
impl Debug for LinkStyle
[src]
impl FromStr for LinkStyle
[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more