Pretty Debug adds a Debugger
trait which simply allows you to print to the console with user defined module tags.
This crate is fine to use though I doubt will ever be needed due to severe lack of functionality but is intended as a test to publish to crates.io
Simply define an enum implementing the Debugger trait as following:
``` rs enum Debug { Module, }
impl Debugger for Debug { fn display(&self) -> String { match self { Debug::Module => "[From Module]", } .to_string() } } ```
Note: the return of the display
function are used as a prefix.
Then call the debug method on the desired variant of your enum:
rs
Debug::Module.debug("This was sent from the Module module")
You may refer to the provided example for additional ergonomics.
I expect this crate to only be in use by me, though feel free to make any requests through github with additional features or changes.
I may add some other smaller features in the future if desired for my projects, such as a suffix and default function definitions later.