pub unsafe trait PessimizeCast {
type Pessimized: Pessimize;
// Required methods
fn into_pessimize(self) -> Self::Pessimized;
unsafe fn from_pessimize(x: Self::Pessimized) -> Self;
}Expand description
Convert Self back and forth to a Pessimize impl (Pessimize impl helper)
While only a small number of Pessimize types are supported by inline
assembly, many standard types can be losslessly converted to a lower-level
type (or tuple of types) that implement Pessimize and back in such a way
that the runtime costs should be optimized out.
This trait exposes that capability under a common abstraction vocabulary.
Combined with the related BorrowPessimize trait, it enables implementation
of Pessimize with increased safety reduced boilerplate.
§Safety
By implementing this trait, you guarantee that someone using it as
documented will not trigger Undefined Behavior, since the safe Pessimize
trait can be automatically implemented on top of it
Required Associated Types§
Sourcetype Pessimized: Pessimize
type Pessimized: Pessimize
Pessimize type that can be converted to and from a Self value
Required Methods§
Sourcefn into_pessimize(self) -> Self::Pessimized
fn into_pessimize(self) -> Self::Pessimized
Convert Self to Pessimized
Sourceunsafe fn from_pessimize(x: Self::Pessimized) -> Self
unsafe fn from_pessimize(x: Self::Pessimized) -> Self
Convert back from Pessimized to Self
§Safety
A correct implementation of this operation only needs to be safe for the
intended purpose of converting Self to Pessimized using
into_pessimize(), invoking Pessimize trait operations on the
resulting value, and optionally converting the Pessimized value back
to Self afterwards via from_pessimize().
The final from_pessimize() operation of this round trip must be
performed in the same scope where the initial into_pessimize()
operation was called, or a child scope thereof.
Even if Pessimized is Clone, it is strongly advised to treat the
Pessimized value from into_pessimize() as a !Clone value: don’t
clone or copy it, and stop using it after converting it back to Self.
Otherwise, suprising (but safe) behavior may occur.
No other usage of from_pessimize() is safe. To give a few examples
of incorrect usage of from_pessimize()…
Selfmay contain references to the surrounding stack frame, so even ifPessimizedis'static, letting aPessimizedescape the scope in whichinto_pessimize()was called before converting it back toSelfis unsafe.Selfmay contain!Clonedata like &mut references, so even ifPessimizedisClone, converting two clones of a singlePessimizedvalue back intoSelfis unsafe. In fact, even using thePessimizeimplementation after converting one of the clones toSelfis not guaranteed to produce the desired optimization barrier.Selfmay be!Send, so even ifPessimizedisSend, sending aPessimizedvalue to another thread before callingfrom_pessimize()on that separate thread is unsafe.- Even if two types share the same
Pessimizedrepresentation, abusing thePessimizeCasttrait to perform a cast operation, like casting a reference to another reference with different mutability or lifetime, is unsafe.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl PessimizeCast for bool
impl PessimizeCast for bool
type Pessimized = u8
fn into_pessimize(self) -> u8
unsafe fn from_pessimize(inner: u8) -> Self
Source§impl PessimizeCast for char
impl PessimizeCast for char
type Pessimized = u32
fn into_pessimize(self) -> u32
unsafe fn from_pessimize(inner: u32) -> Self
Source§impl PessimizeCast for String
Available on crate feature alloc only.
impl PessimizeCast for String
alloc only.Source§impl PessimizeCast for Layout
impl PessimizeCast for Layout
type Pessimized = (usize, usize)
fn into_pessimize(self) -> (usize, usize)
unsafe fn from_pessimize(inner: (usize, usize)) -> Self
Source§impl PessimizeCast for float64x1x2_t
Available with target feature neon only.
impl PessimizeCast for float64x1x2_t
neon only.type Pessimized = (float64x1_t, float64x1_t)
fn into_pessimize(self) -> (float64x1_t, float64x1_t)
unsafe fn from_pessimize(inner: (float64x1_t, float64x1_t)) -> Self
Source§impl PessimizeCast for float64x1x3_t
Available with target feature neon only.
impl PessimizeCast for float64x1x3_t
neon only.type Pessimized = (float64x1_t, float64x1_t, float64x1_t)
fn into_pessimize(self) -> (float64x1_t, float64x1_t, float64x1_t)
unsafe fn from_pessimize(inner: (float64x1_t, float64x1_t, float64x1_t)) -> Self
Source§impl PessimizeCast for float64x1x4_t
Available with target feature neon only.
impl PessimizeCast for float64x1x4_t
neon only.type Pessimized = (float64x1_t, float64x1_t, float64x1_t, float64x1_t)
fn into_pessimize(self) -> (float64x1_t, float64x1_t, float64x1_t, float64x1_t)
unsafe fn from_pessimize( inner: (float64x1_t, float64x1_t, float64x1_t, float64x1_t), ) -> Self
Source§impl PessimizeCast for float64x2x2_t
Available with target feature neon only.
impl PessimizeCast for float64x2x2_t
neon only.type Pessimized = (float64x2_t, float64x2_t)
fn into_pessimize(self) -> (float64x2_t, float64x2_t)
unsafe fn from_pessimize(inner: (float64x2_t, float64x2_t)) -> Self
Source§impl PessimizeCast for float64x2x3_t
Available with target feature neon only.
impl PessimizeCast for float64x2x3_t
neon only.type Pessimized = (float64x2_t, float64x2_t, float64x2_t)
fn into_pessimize(self) -> (float64x2_t, float64x2_t, float64x2_t)
unsafe fn from_pessimize(inner: (float64x2_t, float64x2_t, float64x2_t)) -> Self
Source§impl PessimizeCast for float64x2x4_t
Available with target feature neon only.
impl PessimizeCast for float64x2x4_t
neon only.type Pessimized = (float64x2_t, float64x2_t, float64x2_t, float64x2_t)
fn into_pessimize(self) -> (float64x2_t, float64x2_t, float64x2_t, float64x2_t)
unsafe fn from_pessimize( inner: (float64x2_t, float64x2_t, float64x2_t, float64x2_t), ) -> Self
Source§impl PessimizeCast for Simd<f64, 1>
Available on crate feature nightly and target feature neon only.
impl PessimizeCast for Simd<f64, 1>
nightly and target feature neon only.type Pessimized = float64x1_t
fn into_pessimize(self) -> float64x1_t
unsafe fn from_pessimize(inner: float64x1_t) -> Self
Source§impl PessimizeCast for Simd<f64, 2>
Available on crate feature nightly and target feature neon only.
impl PessimizeCast for Simd<f64, 2>
nightly and target feature neon only.type Pessimized = float64x2_t
fn into_pessimize(self) -> float64x2_t
unsafe fn from_pessimize(inner: float64x2_t) -> Self
Source§impl PessimizeCast for Error
impl PessimizeCast for Error
type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl PessimizeCast for PhantomPinned
impl PessimizeCast for PhantomPinned
type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl PessimizeCast for Ipv4Addr
Available on crate feature std only.
impl PessimizeCast for Ipv4Addr
std only.type Pessimized = u32
fn into_pessimize(self) -> u32
unsafe fn from_pessimize(inner: u32) -> Self
Source§impl PessimizeCast for SocketAddrV4
Available on crate feature std only.
impl PessimizeCast for SocketAddrV4
std only.type Pessimized = (Ipv4Addr, u16)
fn into_pessimize(self) -> (Ipv4Addr, u16)
unsafe fn from_pessimize(inner: (Ipv4Addr, u16)) -> Self
Source§impl PessimizeCast for RangeFull
impl PessimizeCast for RangeFull
type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl PessimizeCast for AtomicBool
Available on target_has_atomic="8" only.
impl PessimizeCast for AtomicBool
target_has_atomic="8" only.type Pessimized = bool
fn into_pessimize(self) -> bool
unsafe fn from_pessimize(inner: bool) -> Self
Source§impl PessimizeCast for AtomicI8
Available on target_has_atomic="8" only.
impl PessimizeCast for AtomicI8
target_has_atomic="8" only.type Pessimized = i8
fn into_pessimize(self) -> i8
unsafe fn from_pessimize(inner: i8) -> Self
Source§impl PessimizeCast for AtomicI16
Available on target_has_atomic="16" only.
impl PessimizeCast for AtomicI16
target_has_atomic="16" only.type Pessimized = i16
fn into_pessimize(self) -> i16
unsafe fn from_pessimize(inner: i16) -> Self
Source§impl PessimizeCast for AtomicI32
Available on target_has_atomic="32" only.
impl PessimizeCast for AtomicI32
target_has_atomic="32" only.type Pessimized = i32
fn into_pessimize(self) -> i32
unsafe fn from_pessimize(inner: i32) -> Self
Source§impl PessimizeCast for AtomicI64
Available on target_has_atomic="64" and 64-bit only.
impl PessimizeCast for AtomicI64
target_has_atomic="64" and 64-bit only.type Pessimized = i64
fn into_pessimize(self) -> i64
unsafe fn from_pessimize(inner: i64) -> Self
Source§impl PessimizeCast for AtomicIsize
Available on target_has_atomic="ptr" only.
impl PessimizeCast for AtomicIsize
target_has_atomic="ptr" only.type Pessimized = isize
fn into_pessimize(self) -> isize
unsafe fn from_pessimize(inner: isize) -> Self
Source§impl PessimizeCast for AtomicU8
Available on target_has_atomic="8" only.
impl PessimizeCast for AtomicU8
target_has_atomic="8" only.type Pessimized = u8
fn into_pessimize(self) -> u8
unsafe fn from_pessimize(inner: u8) -> Self
Source§impl PessimizeCast for AtomicU16
Available on target_has_atomic="16" only.
impl PessimizeCast for AtomicU16
target_has_atomic="16" only.type Pessimized = u16
fn into_pessimize(self) -> u16
unsafe fn from_pessimize(inner: u16) -> Self
Source§impl PessimizeCast for AtomicU32
Available on target_has_atomic="32" only.
impl PessimizeCast for AtomicU32
target_has_atomic="32" only.type Pessimized = u32
fn into_pessimize(self) -> u32
unsafe fn from_pessimize(inner: u32) -> Self
Source§impl PessimizeCast for AtomicU64
Available on target_has_atomic="64" and 64-bit only.
impl PessimizeCast for AtomicU64
target_has_atomic="64" and 64-bit only.type Pessimized = u64
fn into_pessimize(self) -> u64
unsafe fn from_pessimize(inner: u64) -> Self
Source§impl PessimizeCast for AtomicUsize
Available on target_has_atomic="ptr" only.
impl PessimizeCast for AtomicUsize
target_has_atomic="ptr" only.type Pessimized = usize
fn into_pessimize(self) -> usize
unsafe fn from_pessimize(inner: usize) -> Self
Source§impl PessimizeCast for OsString
Available on crate feature std and (Unix or WASI) only.
impl PessimizeCast for OsString
std and (Unix or WASI) only.Source§impl PessimizeCast for File
Available on crate feature std and (Unix or Windows) only.
impl PessimizeCast for File
std and (Unix or Windows) only.type Pessimized = i32
fn into_pessimize(self) -> RawFd
unsafe fn from_pessimize(inner: RawFd) -> Self
Source§impl PessimizeCast for Permissions
Available on crate feature std and Unix only.
impl PessimizeCast for Permissions
std and Unix only.type Pessimized = u32
fn into_pessimize(self) -> u32
unsafe fn from_pessimize(inner: u32) -> Self
Source§impl PessimizeCast for Empty
Available on crate feature std only.
impl PessimizeCast for Empty
std only.type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl PessimizeCast for Repeat
Available on crate feature std only.
impl PessimizeCast for Repeat
std only.type Pessimized = u8
fn into_pessimize(self) -> u8
unsafe fn from_pessimize(inner: u8) -> Self
Source§impl PessimizeCast for Sink
Available on crate feature std only.
impl PessimizeCast for Sink
std only.type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl PessimizeCast for TcpListener
Available on crate feature std and (Unix or Windows) only.
impl PessimizeCast for TcpListener
std and (Unix or Windows) only.type Pessimized = i32
fn into_pessimize(self) -> RawFd
unsafe fn from_pessimize(inner: RawFd) -> Self
Source§impl PessimizeCast for TcpStream
Available on crate feature std and (Unix or Windows) only.
impl PessimizeCast for TcpStream
std and (Unix or Windows) only.type Pessimized = i32
fn into_pessimize(self) -> RawFd
unsafe fn from_pessimize(inner: RawFd) -> Self
Source§impl PessimizeCast for UdpSocket
Available on crate feature std and (Unix or Windows) only.
impl PessimizeCast for UdpSocket
std and (Unix or Windows) only.type Pessimized = i32
fn into_pessimize(self) -> RawFd
unsafe fn from_pessimize(inner: RawFd) -> Self
Source§impl PessimizeCast for PathBuf
Available on crate feature std and (Unix or WASI) only.
impl PessimizeCast for PathBuf
std and (Unix or WASI) only.type Pessimized = OsString
fn into_pessimize(self) -> OsString
unsafe fn from_pessimize(inner: OsString) -> Self
Source§impl PessimizeCast for ExitStatus
Available on (crate feature std or test) and Unix only.
impl PessimizeCast for ExitStatus
std or test) and Unix only.type Pessimized = i32
fn into_pessimize(self) -> i32
unsafe fn from_pessimize(inner: i32) -> Self
Source§impl PessimizeCast for Output
Available on (crate feature std or test) and Unix only.
impl PessimizeCast for Output
std or test) and Unix only.type Pessimized = (ExitStatus, Vec<u8>, Vec<u8>)
fn into_pessimize(self) -> (ExitStatus, Vec<u8>, Vec<u8>)
unsafe fn from_pessimize(inner: (ExitStatus, Vec<u8>, Vec<u8>)) -> Self
Source§impl PessimizeCast for NonZeroI8
impl PessimizeCast for NonZeroI8
type Pessimized = i8
fn into_pessimize(self) -> i8
unsafe fn from_pessimize(inner: i8) -> Self
Source§impl PessimizeCast for NonZeroI16
impl PessimizeCast for NonZeroI16
type Pessimized = i16
fn into_pessimize(self) -> i16
unsafe fn from_pessimize(inner: i16) -> Self
Source§impl PessimizeCast for NonZeroI32
impl PessimizeCast for NonZeroI32
type Pessimized = i32
fn into_pessimize(self) -> i32
unsafe fn from_pessimize(inner: i32) -> Self
Source§impl PessimizeCast for NonZeroI64
impl PessimizeCast for NonZeroI64
type Pessimized = i64
fn into_pessimize(self) -> i64
unsafe fn from_pessimize(inner: i64) -> Self
Source§impl PessimizeCast for NonZeroIsize
impl PessimizeCast for NonZeroIsize
type Pessimized = isize
fn into_pessimize(self) -> isize
unsafe fn from_pessimize(inner: isize) -> Self
Source§impl PessimizeCast for NonZeroU8
impl PessimizeCast for NonZeroU8
type Pessimized = u8
fn into_pessimize(self) -> u8
unsafe fn from_pessimize(inner: u8) -> Self
Source§impl PessimizeCast for NonZeroU16
impl PessimizeCast for NonZeroU16
type Pessimized = u16
fn into_pessimize(self) -> u16
unsafe fn from_pessimize(inner: u16) -> Self
Source§impl PessimizeCast for NonZeroU32
impl PessimizeCast for NonZeroU32
type Pessimized = u32
fn into_pessimize(self) -> u32
unsafe fn from_pessimize(inner: u32) -> Self
Source§impl PessimizeCast for NonZeroU64
impl PessimizeCast for NonZeroU64
type Pessimized = u64
fn into_pessimize(self) -> u64
unsafe fn from_pessimize(inner: u64) -> Self
Source§impl PessimizeCast for NonZeroUsize
impl PessimizeCast for NonZeroUsize
type Pessimized = usize
fn into_pessimize(self) -> usize
unsafe fn from_pessimize(inner: usize) -> Self
Source§impl<'a, T: ?Sized> PessimizeCast for &'a T
impl<'a, T: ?Sized> PessimizeCast for &'a T
type Pessimized = NonNull<T>
fn into_pessimize(self) -> NonNull<T>
unsafe fn from_pessimize(x: NonNull<T>) -> Self
Source§impl<'a, T: ?Sized> PessimizeCast for &'a mut T
impl<'a, T: ?Sized> PessimizeCast for &'a mut T
type Pessimized = NonNull<T>
fn into_pessimize(self) -> NonNull<T>
unsafe fn from_pessimize(x: NonNull<T>) -> Self
Source§impl<Idx: Clone + Pessimize> PessimizeCast for Range<Idx>
impl<Idx: Clone + Pessimize> PessimizeCast for Range<Idx>
type Pessimized = (Idx, Idx)
fn into_pessimize(self) -> (Idx, Idx)
unsafe fn from_pessimize(inner: (Idx, Idx)) -> Self
Source§impl<Idx: Clone + Pessimize> PessimizeCast for RangeFrom<Idx>
impl<Idx: Clone + Pessimize> PessimizeCast for RangeFrom<Idx>
type Pessimized = Idx
fn into_pessimize(self) -> Idx
unsafe fn from_pessimize(inner: Idx) -> Self
Source§impl<Idx: Clone + Pessimize> PessimizeCast for RangeInclusive<Idx>
impl<Idx: Clone + Pessimize> PessimizeCast for RangeInclusive<Idx>
type Pessimized = (Idx, Idx)
fn into_pessimize(self) -> (Idx, Idx)
unsafe fn from_pessimize(inner: (Idx, Idx)) -> Self
Source§impl<Idx: Clone + Pessimize> PessimizeCast for RangeTo<Idx>
impl<Idx: Clone + Pessimize> PessimizeCast for RangeTo<Idx>
type Pessimized = Idx
fn into_pessimize(self) -> Idx
unsafe fn from_pessimize(inner: Idx) -> Self
Source§impl<Idx: Clone + Pessimize> PessimizeCast for RangeToInclusive<Idx>
impl<Idx: Clone + Pessimize> PessimizeCast for RangeToInclusive<Idx>
type Pessimized = Idx
fn into_pessimize(self) -> Idx
unsafe fn from_pessimize(inner: Idx) -> Self
Source§impl<R> PessimizeCast for fn() -> R
impl<R> PessimizeCast for fn() -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A1, A2, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A1, A2, A3, A4, A5, A6, A7, A8) -> R
impl<R, A1, A2, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A1, A2, A3, A4, A5, A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A2, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A2, A3, A4, A5, A6, A7, A8) -> R
impl<R, A2, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A2, A3, A4, A5, A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A3, A4, A5, A6, A7, A8) -> R
impl<R, A3, A4, A5, A6, A7, A8> PessimizeCast for fn(A3, A4, A5, A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A4, A5, A6, A7, A8> PessimizeCast for fn(A4, A5, A6, A7, A8) -> R
impl<R, A4, A5, A6, A7, A8> PessimizeCast for fn(A4, A5, A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A5, A6, A7, A8> PessimizeCast for fn(A5, A6, A7, A8) -> R
impl<R, A5, A6, A7, A8> PessimizeCast for fn(A5, A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A6, A7, A8> PessimizeCast for fn(A6, A7, A8) -> R
impl<R, A6, A7, A8> PessimizeCast for fn(A6, A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A7, A8> PessimizeCast for fn(A7, A8) -> R
impl<R, A7, A8> PessimizeCast for fn(A7, A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<R, A8> PessimizeCast for fn(A8) -> R
impl<R, A8> PessimizeCast for fn(A8) -> R
type Pessimized = *const ()
fn into_pessimize(self) -> *const ()
unsafe fn from_pessimize(x: *const ()) -> Self
Source§impl<T> PessimizeCast for Vec<T>
Available on crate feature alloc only.
impl<T> PessimizeCast for Vec<T>
alloc only.Source§impl<T> PessimizeCast for Empty<T>
impl<T> PessimizeCast for Empty<T>
type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl<T> PessimizeCast for PhantomData<T>
impl<T> PessimizeCast for PhantomData<T>
type Pessimized = ()
fn into_pessimize(self)
unsafe fn from_pessimize(inner: ()) -> Self
Source§impl<T> PessimizeCast for AtomicPtr<T>
Available on target_has_atomic="ptr" only.
impl<T> PessimizeCast for AtomicPtr<T>
target_has_atomic="ptr" only.type Pessimized = *mut T
fn into_pessimize(self) -> *mut T
unsafe fn from_pessimize(inner: *mut T) -> Self
Source§impl<T: Clone + Pessimize> PessimizeCast for Repeat<T>
impl<T: Clone + Pessimize> PessimizeCast for Repeat<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for [T; 1]
impl<T: Pessimize> PessimizeCast for [T; 1]
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for UnsafeCell<T>
impl<T: Pessimize> PessimizeCast for UnsafeCell<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for Reverse<T>
impl<T: Pessimize> PessimizeCast for Reverse<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for Once<T>
impl<T: Pessimize> PessimizeCast for Once<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for ManuallyDrop<T>
impl<T: Pessimize> PessimizeCast for ManuallyDrop<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for Wrapping<T>
impl<T: Pessimize> PessimizeCast for Wrapping<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: Pessimize> PessimizeCast for AssertUnwindSafe<T>
impl<T: Pessimize> PessimizeCast for AssertUnwindSafe<T>
type Pessimized = T
fn into_pessimize(self) -> T
unsafe fn from_pessimize(inner: T) -> Self
Source§impl<T: ?Sized + Unpin, P: Deref<Target = T> + Pessimize> PessimizeCast for Pin<P>
impl<T: ?Sized + Unpin, P: Deref<Target = T> + Pessimize> PessimizeCast for Pin<P>
type Pessimized = P
fn into_pessimize(self) -> P
unsafe fn from_pessimize(p: P) -> Self
Source§impl<T: ?Sized> PessimizeCast for *mut T
impl<T: ?Sized> PessimizeCast for *mut T
type Pessimized = *const T
fn into_pessimize(self) -> *const T
unsafe fn from_pessimize(x: *const T) -> Self
Source§impl<T: ?Sized> PessimizeCast for Box<T>
Available on crate feature alloc only.
impl<T: ?Sized> PessimizeCast for Box<T>
alloc only.