Skip to main content

ValueTryIntoString

Trait ValueTryIntoString 

Source
pub trait ValueTryIntoString {
    type String;

    // Required method
    fn try_into_string(self) -> Result<Self::String, TryTypeError>;
}
Expand description

A trait that allows destructively turning a value into it’s string representation

Required Associated Types§

Source

type String

The type for Strings

Required Methods§

Source

fn try_into_string(self) -> Result<Self::String, TryTypeError>

Tries to turn the value into it’s string representation

§Errors

if the requested type doesn’t match the actual type

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§