Module const_panic::fmt[][src]

Expand description

Formatting-related items

Panic formatting for custom types can be done in these ways (in increasing order of verbosity):

  • Using the impl_panicfmt macro (requires the default-enabled "non_basic" feature)
  • Using the flatten_panicvals macro (requires the default-enabled "non_basic" feature)
  • Manually implementing the PanicFmt trait as described in its docs.

Re-exports

pub use self::Delimiter::CloseBrace;
non_basic
pub use self::Delimiter::CloseBracket;
non_basic
pub use self::Delimiter::CloseParen;
non_basic
pub use self::Delimiter::Empty as EmptyDelimiter;
non_basic
pub use self::Delimiter::OpenBrace;
non_basic
pub use self::Delimiter::OpenBracket;
non_basic
pub use self::Delimiter::OpenParen;
non_basic

Structs

For computing the PanicFmt::PV_COUNT of a struct or enum variant, with the call method.

Carries all of the configuration for formatting functions.

Marker type used as the PanicFmt::Kind for user-defined types.

A marker type that proves that S implements PanicFmt<This = T, Kind = K>.

Marker type used as the PanicFmt::Kind associated type for std types.

Separatornon_basic

For alternate flag-aware separation of fields, collection elements, etc.

Enums

Delimiternon_basic

For outputting an alternate flag-aware delimiter.

What kind of formatting to do, either Display or Debug.

IsLastnon_basic

For telling Separator whether it comes after the last field or not.

TypeDelimnon_basic

Whether a struct or variant is Tupled or Braced.

Constants

COMMA_SEPnon_basic

A comma separator for use between fields or elements.

COMMA_TERMnon_basic

A comma for use after the last field or element.

How much indentation (in spaces) is added with FmtArg::indent, and removed with FmtArg::unindent.

Traits

Trait for types that can be formatted by const panics.

Type Definitions

ShortStringnon_basic

A stack allocated string type that’s convetible into PanicVal.