Trait AstToStrExt

Source
pub trait AstToStrExt {
    // Provided method
    fn with_display_as_debug_wrapper(&self) -> DisplayAsDebugWrapper<&Self>
       where Self: Display { ... }
}
Expand description

This trait provides a convenience method for wrapping types that implement Display with DisplayAsDebugWrapper. Implemented for String, str, and Cow by default.

Provided Methods§

Source

fn with_display_as_debug_wrapper(&self) -> DisplayAsDebugWrapper<&Self>
where Self: Display,

Wraps the object with a DisplayAsDebugWrapper.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AstToStrExt for str

Source§

impl AstToStrExt for String

Source§

impl<'a> AstToStrExt for Cow<'a, str>

Implementors§