pub trait HyperlinkExt {
    // Required method
    fn link(&self, url: impl ToString) -> PaintedLink<&Self>;
}
Available on crate feature hyperlink only.
Expand description

Extension trait to apply hyperlinks to any value, implemented for all types.

See the module level docs for usage details.

Required Methods§

Create a painted hyperlink with a target URL of url.

See hyperlink for details.

§Example
use yansi::hyperlink::HyperlinkExt;

println!("See {}.", "our docs".link("https://docs.rs/yansi"));

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> HyperlinkExt for T