Skip to main content

AsDebug

Trait AsDebug 

Source
pub trait AsDebug {
    // Required method
    fn as_debug(&self) -> &dyn Debug;
}
Expand description

Helper trait to obtain a &dyn Debug view.

This is auto-implemented for any T: Debug and is used by the runtime to format Opaque values without knowing their concrete type.

Required Methods§

Source

fn as_debug(&self) -> &dyn Debug

Returns self as a &dyn Debug trait object.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> AsDebug for T
where T: Debug,