1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Miscellaneous discrete and simple diagnostics facilities for Rust.
//!
//! **Diagnosticism** supplements what is available in the standard library.
//! It is implemented in several languages; in Rust the facilities are
//! (currently) aimed around supplementing [`Debug`](std::fmt::Debug),
//! together with lightweight timing and source-location helpers.
//!
//! For example, [`Ellipsis`] can be used in a custom
//! [`Debug`](std::fmt::Debug) implementation to elide fields in terse
//! (`"{:?}"`) output while still including them in alternate (`"{:#?}"`)
//! form.
//!
//! # Installation
//!
//! Reference in **Cargo.toml** in the usual way:
//!
//! ```toml
//! diagnosticism = { version = "0" }
//! ```
//!
//! # Components
//!
//! ## Types and functions
//!
//! The following are re-exported at the crate root (and also available in
//! [`diagnostics`]):
//!
//! * [`DebugSqueezer`] — restrict the length of
//! [`Debug`](std::fmt::Debug) output for individual fields;
//! * [`DoomGram`] — decimal order-of-magnitude histogram with a compact
//! 12-character strip for logging;
//! * [`Ellipsis`] — emit `"..."` for redacted
//! [`Debug`](std::fmt::Debug) fields;
//! * [`Password`] — emit a run of `*` characters for sensitive
//! [`Debug`](std::fmt::Debug) fields;
//! * [`doom_scope`] — time a closure and record the elapsed duration in a
//! [`DoomGram`];
//!
//! ## Macros (crate root)
//!
//! File, line, and function helpers are exported at the crate root:
//!
//! * [`fileline!`] — file name and line number at the call site;
//! * [`filelinefunction!`] — file, line, and unqualified function name;
//! * [`filelinefunction_fully_qualified_name!`] — file, line, and
//! fully-qualified function name;
//! * [`function_fully_qualified_name!`] — fully-qualified name of the
//! enclosing function;
//! * [`function_name_only!`] — unqualified name of the enclosing function;
//! * [`type_name_only!`] — unqualified name of a given type;
//!
//! ## Redacting [`Debug`](std::fmt::Debug) fields
//!
//! Both [`Ellipsis`] and [`Password`] are field placeholders in custom
//! [`Debug`](std::fmt::Debug) implementations; neither reads the underlying
//! value.
//!
//! * [`Ellipsis`] — `"..."` for verbose, non-sensitive elision; often used
//! with `{:#?}` alternate output;
//! * [`Password`] — a masked `*` run for sensitive values; use
//! [`Password::new`] for width;
//!
//! # Examples
//!
//! ```
//! use diagnosticism::Ellipsis;
//!
//! println!("redacted: {:?}", Ellipsis::default());
//! ```
//!
//! Further examples are provided in the repository **examples** directory
//! and in the project
//! [README](https://github.com/synesissoftware/Diagnosticism.Rust).
// lib.rs
pub use ;
// ///////////////////////////// end of file //////////////////////////// //