Expand description
String utilities.
Structs§
- Escaped
Str - Same as
QuotedStr, but also escapes new lines and tabs. - Indent
- A helper struct to keep track of indentation levels.
- MaxLen
String - Newtype wrapper around
Stringwhose byte length is guaranteed to be less than or equal to the providedMAX. - Quoted
Str - Displays a string slice surrounded by double quotes with any inner double quote characters escaped.
- Redacting 🔒
- Redacting
Writer 🔒
Traits§
- Indent
Like - Convenience methods for pretty-printing based on indentation
that are automatically available for context objects that can
be mutably referenced as an
Indentinstance. - StrExt
- Extension methods for
str.
Functions§
- bracketed
- Creates a type whose
fmt::Displayimplementation outputs item preceded byopenand followed byclose. - closure_
to_ display - Given a closure, it creates a Display that simply calls the given closure when fmt’d.
- redact
- Returns a “redacted” debug implementation. When running with soft assertions
enabled or with the alternate /
#flag specified, this prints identically to the underlying value; otherwise, we print the basic debug representation with alphanumeric characters replaced. (For example, the number-3.6will print as<-#.#>.) - separated
- Creates a type whose
fmt::Displayimplementation outputs each item initerseparated byseparator.