pub trait ToLeanString {
// Required method
fn try_to_lean_string(&self) -> Result<LeanString, ToLeanStringError>;
// Provided method
fn to_lean_string(&self) -> LeanString { ... }
}Expand description
A trait for converting a value to a LeanString.
Required Methods§
Sourcefn try_to_lean_string(&self) -> Result<LeanString, ToLeanStringError>
fn try_to_lean_string(&self) -> Result<LeanString, ToLeanStringError>
Attempts to convert the value to a LeanString.
§Errors
Returns a ToLeanStringError if the conversion fails.
Provided Methods§
Sourcefn to_lean_string(&self) -> LeanString
fn to_lean_string(&self) -> LeanString
Converts the value to a LeanString.
§Panics
Panics if conversion fails. For a non-panicking version, use try_to_lean_string.