Struct const_panic::StdWrapper [−][src]
#[repr(transparent)]pub struct StdWrapper<T>(pub T);Expand description
A wrapper type used to define methods for std types.
Std types are coerced to this type through the approach used in the
coerce_fmt macro.
Example
Formatting std types with this type’s to_panicvals methods,
without using macros.
use const_panic::{ArrayString, FmtArg, StdWrapper};
assert_eq!(
ArrayString::<99>::from_panicvals(
&StdWrapper("hello").to_panicvals(FmtArg::DEBUG)
).unwrap(),
r#""hello""#
);
assert_eq!(
ArrayString::<99>::from_panicvals(
&StdWrapper(&[3u8, 5, 8]).to_panicvals(FmtArg::ALT_DEBUG)
).unwrap(),
"[\n 3,\n 5,\n 8,\n]"
);
Tuple Fields
0: TImplementations
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the slice to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts the array to a PanicVal.
Converts this u8 to a single-element PanicVal array.
Converts this u8 to a PanicVal.
Converts this u16 to a single-element PanicVal array.
Converts this u16 to a PanicVal.
Converts this u32 to a single-element PanicVal array.
Converts this u32 to a PanicVal.
Converts this u64 to a single-element PanicVal array.
Converts this u64 to a PanicVal.
Converts this u128 to a single-element PanicVal array.
Converts this u128 to a PanicVal.
Converts this usize to a single-element PanicVal array.
Converts this usize to a PanicVal.
Converts this i8 to a single-element PanicVal array.
Converts this i8 to a PanicVal.
Converts this i16 to a single-element PanicVal array.
Converts this i16 to a PanicVal.
Converts this i32 to a single-element PanicVal array.
Converts this i32 to a PanicVal.
Converts this i64 to a single-element PanicVal array.
Converts this i64 to a PanicVal.
Converts this i128 to a single-element PanicVal array.
Converts this i128 to a PanicVal.
Converts this isize to a single-element PanicVal array.
Converts this isize to a PanicVal.
Formats this bool into a single-PanicVal array
Formats this bool into a PanicVal
Formats this &str into a single-PanicVal array
Formats this &str into a PanicVal
Coerces a &&[PanicVal<'_>] into a &[PanicVal<'_>]
Coerces a &&[PanicVal<'_>; N] into a &[PanicVal<'_>]
Coerces a &[PanicVal<'_>; N] into a &[PanicVal<'_>]
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU8 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU8 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI8 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI8 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU16 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU16 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI16 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI16 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU32 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU32 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI32 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI32 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU64 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU64 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI64 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI64 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU128 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroU128 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI128 to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroI128 to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroUsize to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroUsize to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroIsize to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonZeroIsize to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this *const T to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this *const T to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this *mut T to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this *mut T to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonNull<T> to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this NonNull<T> to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this PhantomData<T> to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this PhantomData<T> to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this PhantomPinned to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this PhantomPinned to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this () to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this () to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this std::cmp::Ordering to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this std::cmp::Ordering to a PanicVal.
This is supported on crate feature non_basic only.
non_basic only.Converts this std::sync::atomic::Ordering to a single-element PanicVal array.
This is supported on crate feature non_basic only.
non_basic only.Converts this std::sync::atomic::Ordering to a PanicVal.
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