docs.rs failed to build dbg-pls-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
dbg-pls-0.4.3
dbg-pls
A Debug-like trait for rust that outputs properly formatted code
Usage in libraries
Add to your Cargo.toml
= "*"
Add to your types
Usage for applications
Add to your Cargo.toml
= { = "0.1", = ["pretty"] }
And print using debug, eg
println!;
Features
derive- enables the#[derive(DebugPls)]derive (default)pretty- enables thedebugfunction for pretty printingcolors- enables thecolorfunction for syntax highlighted printing
Example
use ;
let mut val = ;
val.bar = "Hello, world! I am a very long string";
println!;
Outputs
[
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo {
foo: 5,
bar: "Hello, world! I am a very long string",
},
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
Demo { foo: 5, bar: "hello" },
]
Example (highlighting)
use ;
let mut val = ;
val.bar = "Hello, world! I am a very long string";
println!;
Outputs:
