Struct const_panic::PanicVal[][src]

#[non_exhaustive]
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

A PanicVal that formats to nothing.

How many spaces are printed before this

How many spaces are printed after this

Sets the amount of spaces printed before this to fmtarg.indentation.

Sets the amount of spaces printed after this to fmtarg.indentation.

Sets the amount of spaces printed before this

Sets the amount of spaces printed after this

Constructs a PanicVal which outputs the contents of string verbatim.

Equivalent to PanicVal::from_str(string, FmtArg::DISPLAY)

This is supported on crate feature non_basic only.

Constructs a PanicVal from a ShortString, that’s output verbatim.

This is supported on crate feature non_basic only.
Panics

This may panic 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.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

This is supported on crate feature non_basic only.

Constructs a PanicVal from a slice.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs this PanicVal from an integer.

Constructs a PanicVal from a bool .

Constructs a PanicVal from a &str

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The type after dereferencing all references. Read more

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

A marker type that proves that Self implements PanicFmt. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.