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§
source§impl<S: ?Sized, T: ?Sized, K> IsPanicFmt<S, T, K>
impl<S: ?Sized, T: ?Sized, K> IsPanicFmt<S, T, K>
source§impl<S: ?Sized, T: ?Sized> IsPanicFmt<S, T, IsStdType>
impl<S: ?Sized, T: ?Sized> IsPanicFmt<S, T, IsStdType>
sourcepub const fn coerce(self, x: &T) -> StdWrapper<&T>
pub const fn coerce(self, x: &T) -> StdWrapper<&T>
For coercing &T
to StdWrapper<&T>
.
source§impl<S: ?Sized, T: ?Sized> IsPanicFmt<S, T, IsCustomType>
impl<S: ?Sized, T: ?Sized> IsPanicFmt<S, T, IsCustomType>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)