pub trait StringInterpolation<T>{
// Required methods
fn replace_placeholder_with_string(
&self,
placeholder: &str,
value: &str,
) -> String;
fn with_indent(&self, spaces: usize) -> String;
}Expand description
Add enhanced string interpolation functionality
Required Methods§
Sourcefn replace_placeholder_with_string(
&self,
placeholder: &str,
value: &str,
) -> String
fn replace_placeholder_with_string( &self, placeholder: &str, value: &str, ) -> String
Replace placeholder instances with a given value (basic interpolation based on handlebars template syntax)
Sourcefn with_indent(&self, spaces: usize) -> String
fn with_indent(&self, spaces: usize) -> String
Prepend indentation of a given number of spaces to each line of a text
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".