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§
Source§impl<S: ?Sized, T: ?Sized, K> IsPanicFmt<S, T, K>
 
impl<S: ?Sized, T: ?Sized, K> IsPanicFmt<S, T, K>
Sourcepub const fn infer(self, _: &S) -> Self
 
pub const fn infer(self, _: &S) -> Self
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.
Sourcepub const fn coerce<'a>(self, x: &'a T) -> CoerceReturnOutput<&'a T, K>
 
pub const fn coerce<'a>(self, x: &'a T) -> CoerceReturnOutput<&'a T, K>
For coercing &T to StdWrapper<&T>.
Trait Implementations§
impl<S: ?Sized, T: ?Sized, K> Copy for IsPanicFmt<S, T, K>
Auto Trait Implementations§
impl<S, T, K> Freeze for IsPanicFmt<S, T, K>
impl<S, T, K> RefUnwindSafe for IsPanicFmt<S, T, K>
impl<S, T, K> Send for IsPanicFmt<S, T, K>
impl<S, T, K> Sync for IsPanicFmt<S, T, K>
impl<S, T, K> Unpin for IsPanicFmt<S, T, K>
impl<S, T, K> UnwindSafe for IsPanicFmt<S, T, K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more