[][src]Crate lark_debug_with

Debugging utilities

Implement DebugWith<Cx> for your type. Then, when using debug! or whatever, do debug!("{}", foo.debug_with(cx)).

Macros

debug_fallback_impl

Generates a DebugWith impl that accepts any Cx and uses the built-in Debug trait. You can specialize this to particular contexts by implementing FmtWithSpecialized<Cx> to yield a specialized impl.

Structs

DebugCxPair

Traits

DebugWith

A Debug trait that carries a context. Most types in Lark implement it, and you can use derive(DebugWith) to get Debug-like behavior (from the lark-debug-derive crate).

FmtWithSpecialized

Useful trait for writing DebugWith implementations that are specialized to different contexts. Just derive Debug and use the macro debug_specialized_impl; then you can implement FmtWithSpecialized<Cx> for various specialized contexts as you choose.