pub trait DebugWithDb<Storage>: Sized {
// Required method
fn fmt_with_db(&self, _db: &Db<Storage>, f: &mut Formatter<'_>) -> Result;
// Provided method
fn debug_with_db<'a>(
&'a self,
db: &'a Db<Storage>,
) -> DebugWithDbWrapper<'a, Self, Storage> { ... }
}Expand description
Format Self into a debug string similar to the Debug trait but
with a Db to provide additional context. This is helpful to format
id-based types into a more human readable format by grabbing additional
data stored elsewhere.
Required Methods§
fn fmt_with_db(&self, _db: &Db<Storage>, f: &mut Formatter<'_>) -> Result
Provided Methods§
fn debug_with_db<'a>( &'a self, db: &'a Db<Storage>, ) -> DebugWithDbWrapper<'a, Self, Storage>
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.