Struct const_panic::PanicVal [−][src]
pub struct PanicVal<'a> { /* fields omitted */ }
Expand description
An opaque enum of the values that this crate knows how to format, along with some formatting metadata.
This has constructor functions to make a PanicVal
from:
bool
- Integers
&str
- Arrays/Slices of primitives (with the “non_basic” feature, enabled by default)
ShortString
(with the “non_basic” feature, enabled by default)
Implementations
Constructs a PanicVal
from a ShortString
.
Sets the amount of spaces printed before this to fmtarg.indentation
.
Note that only strings can be padded.
Sets the amount of spaces printed after this to fmtarg.indentation
.
Note that only strings can be padded.
Constructs a PanicVal which outputs the contents of string
verbatim.
Equivalent to PanicVal::from_str(string, FmtArg::DISPLAY)
Constructs a PanicVal from a ShortString
, which outputs the string verbatim.
pub const fn from_element_separator(
separator: &str,
is_last_field: IsLast,
fmtarg: FmtArg
) -> Self
pub const fn from_element_separator(
separator: &str,
is_last_field: IsLast,
fmtarg: FmtArg
) -> Self
Constructs a PanicVal
usable as a separator between fields or elements.
This is sensitive to the fmtarg.is_alternate
flag,
for more details on that you can look at the docs for
Separator::to_panicval
Panics
This panics if string.len()
is greater than 12.
Wraps this PanicVal
in a single-element array.
Returns a copy of this PanicVal
.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
This is supported on crate feature non_basic
only.
non_basic
only.Constructs a PanicVal
from a slice.
Constructs this PanicVal
from an integer.
Constructs this PanicVal
from an integer.
Trait Implementations
type Kind = IsCustomType
type Kind = IsCustomType
Whether this is a user-defined type or standard library type. Read more
The length of the array returned in Self::to_panicvals
(an inherent method that formats the type for panic messages). Read more