Trait ToLeanString

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

Source

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§

Source

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.

Implementors§