soroban_spec_rust

Trait ToFormattedString

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl ToFormattedString for TokenStream

Implementors§