pub trait LinkTransformer: Debug + DynClone {
// Required methods
fn apply(&self, link: &mut Link<'_>) -> Result<()>;
fn tag(&self) -> String;
// Provided methods
fn pattern(&self) -> Regex { ... }
fn strip_tag(&self) -> bool { ... }
}Expand description
If a link transformer matches on a tag, it shall produce a meaningful regex-substituted transformation.
Required Methods§
Provided Methods§
Sourcefn pattern(&self) -> Regex
fn pattern(&self) -> Regex
Regex which will be applied to extract the salient part of the link destination.
fn strip_tag(&self) -> bool
Implementors§
impl LinkTransformer for DocsRustlang
impl LinkTransformer for Docsrs
impl LinkTransformer for Substitution
A Substitution is a link transformer of sorts, too.