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§
Sourcefn with_display_as_debug_wrapper(&self) -> DisplayAsDebugWrapper<&Self>where
Self: Display,
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.