pub trait Replacer<D: Doc> {
// Required method
fn generate_replacement(
&self,
nm: &NodeMatch<'_, D>,
) -> Vec<<D::Source as Content>::Underlying>;
// Provided method
fn get_replaced_range(
&self,
nm: &NodeMatch<'_, D>,
matcher: impl Matcher<D::Lang>,
) -> Range<usize> { ... }
}
Expand description
Replace meta variable in the replacer string
Required Methods§
fn generate_replacement( &self, nm: &NodeMatch<'_, D>, ) -> Vec<<D::Source as Content>::Underlying>
Provided Methods§
fn get_replaced_range( &self, nm: &NodeMatch<'_, D>, matcher: impl Matcher<D::Lang>, ) -> Range<usize>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.