pub trait ToFormattedString {
// Required method
fn to_formatted_string(&self) -> Result<String, Error>;
}
Expand description
Implemented by types that can be converted into pretty formatted Strings of Rust code.
Required Methods§
Sourcefn to_formatted_string(&self) -> Result<String, Error>
fn to_formatted_string(&self) -> Result<String, Error>
Converts the value to a String that is pretty formatted. If there is any error parsing the token stream the raw String version of the code is returned instead.