Struct const_panic::fmt::IsPanicFmt

source ·
pub struct IsPanicFmt<S: ?Sized, T: ?Sized, K> { /* private fields */ }
Expand description

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

Used by const_panic macros to coerce both standard library and user-defined types into some type that has a to_panicvals method.

Implementations§

Constucts an IsPanicFmt

Infers the S type parameter with the argument.

Because the only ways to construct IsPanicFmt use IsPanicFmt<S, S::This, S::Kind>, the other type parameters are inferred along with S.

For coercing &T to StdWrapper<&T>.

For coercing &T (with any amount of stacked references) to &T.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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

Returns the argument unchanged.

A constant of the type witness

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.