pub unsafe trait GetStaticEquivalent_ {
type StaticEquivalent: 'static;
}
Expand description
A type that stands in for Self
,used to create a UTypeId
for doing layout checking.
This may or may not have the same TypeId as Self.
§Safety
The StaticEquivalent
associated type must be either of:
- the same type as
Self
, ignoring lifetime arguments. - a type declared specifically to be the
StaticEquivalent
associated type ofSelf
(and no other type), with the same type and const arguments asSelf
.
In either case, non-'static
type parameters can be replaced with their
GetStaticEquivalent_::StaticEquivalent
associated type.
Required Associated Types§
sourcetype StaticEquivalent: 'static
type StaticEquivalent: 'static
The 'static
equivalent of Self
Implementations on Foreign Types§
source§impl GetStaticEquivalent_ for Void
impl GetStaticEquivalent_ for Void
type StaticEquivalent = Void
source§impl GetStaticEquivalent_ for c_void
impl GetStaticEquivalent_ for c_void
type StaticEquivalent = c_void
source§impl GetStaticEquivalent_ for bool
impl GetStaticEquivalent_ for bool
type StaticEquivalent = bool
source§impl GetStaticEquivalent_ for f32
impl GetStaticEquivalent_ for f32
type StaticEquivalent = f32
source§impl GetStaticEquivalent_ for f64
impl GetStaticEquivalent_ for f64
type StaticEquivalent = f64
source§impl GetStaticEquivalent_ for i8
impl GetStaticEquivalent_ for i8
type StaticEquivalent = i8
source§impl GetStaticEquivalent_ for i16
impl GetStaticEquivalent_ for i16
type StaticEquivalent = i16
source§impl GetStaticEquivalent_ for i32
impl GetStaticEquivalent_ for i32
type StaticEquivalent = i32
source§impl GetStaticEquivalent_ for i64
impl GetStaticEquivalent_ for i64
type StaticEquivalent = i64
source§impl GetStaticEquivalent_ for isize
impl GetStaticEquivalent_ for isize
type StaticEquivalent = isize
source§impl GetStaticEquivalent_ for str
impl GetStaticEquivalent_ for str
type StaticEquivalent = Unsized<str>
source§impl GetStaticEquivalent_ for u8
impl GetStaticEquivalent_ for u8
type StaticEquivalent = u8
source§impl GetStaticEquivalent_ for u16
impl GetStaticEquivalent_ for u16
type StaticEquivalent = u16
source§impl GetStaticEquivalent_ for u32
impl GetStaticEquivalent_ for u32
type StaticEquivalent = u32
source§impl GetStaticEquivalent_ for u64
impl GetStaticEquivalent_ for u64
type StaticEquivalent = u64
source§impl GetStaticEquivalent_ for ()
impl GetStaticEquivalent_ for ()
type StaticEquivalent = ()
source§impl GetStaticEquivalent_ for usize
impl GetStaticEquivalent_ for usize
type StaticEquivalent = usize
source§impl GetStaticEquivalent_ for AtomicBool
impl GetStaticEquivalent_ for AtomicBool
source§impl GetStaticEquivalent_ for AtomicI8
impl GetStaticEquivalent_ for AtomicI8
type StaticEquivalent = AtomicI8
source§impl GetStaticEquivalent_ for AtomicI16
impl GetStaticEquivalent_ for AtomicI16
type StaticEquivalent = AtomicI16
source§impl GetStaticEquivalent_ for AtomicI32
impl GetStaticEquivalent_ for AtomicI32
type StaticEquivalent = AtomicI32
source§impl GetStaticEquivalent_ for AtomicI64
impl GetStaticEquivalent_ for AtomicI64
type StaticEquivalent = AtomicI64
source§impl GetStaticEquivalent_ for AtomicIsize
impl GetStaticEquivalent_ for AtomicIsize
source§impl GetStaticEquivalent_ for AtomicU8
impl GetStaticEquivalent_ for AtomicU8
type StaticEquivalent = AtomicU8
source§impl GetStaticEquivalent_ for AtomicU16
impl GetStaticEquivalent_ for AtomicU16
type StaticEquivalent = AtomicU16
source§impl GetStaticEquivalent_ for AtomicU32
impl GetStaticEquivalent_ for AtomicU32
type StaticEquivalent = AtomicU32
source§impl GetStaticEquivalent_ for AtomicU64
impl GetStaticEquivalent_ for AtomicU64
type StaticEquivalent = AtomicU64
source§impl GetStaticEquivalent_ for AtomicUsize
impl GetStaticEquivalent_ for AtomicUsize
source§impl GetStaticEquivalent_ for NonZeroI8
impl GetStaticEquivalent_ for NonZeroI8
type StaticEquivalent = NonZero<i8>
source§impl GetStaticEquivalent_ for NonZeroI16
impl GetStaticEquivalent_ for NonZeroI16
type StaticEquivalent = NonZero<i16>
source§impl GetStaticEquivalent_ for NonZeroI32
impl GetStaticEquivalent_ for NonZeroI32
type StaticEquivalent = NonZero<i32>
source§impl GetStaticEquivalent_ for NonZeroI64
impl GetStaticEquivalent_ for NonZeroI64
type StaticEquivalent = NonZero<i64>
source§impl GetStaticEquivalent_ for NonZeroIsize
impl GetStaticEquivalent_ for NonZeroIsize
type StaticEquivalent = NonZero<isize>
source§impl GetStaticEquivalent_ for NonZeroU8
impl GetStaticEquivalent_ for NonZeroU8
type StaticEquivalent = NonZero<u8>
source§impl GetStaticEquivalent_ for NonZeroU16
impl GetStaticEquivalent_ for NonZeroU16
type StaticEquivalent = NonZero<u16>
source§impl GetStaticEquivalent_ for NonZeroU32
impl GetStaticEquivalent_ for NonZeroU32
type StaticEquivalent = NonZero<u32>
source§impl GetStaticEquivalent_ for NonZeroU64
impl GetStaticEquivalent_ for NonZeroU64
type StaticEquivalent = NonZero<u64>
source§impl GetStaticEquivalent_ for NonZeroUsize
impl GetStaticEquivalent_ for NonZeroUsize
type StaticEquivalent = NonZero<usize>
source§impl GetStaticEquivalent_ for extern "C" fn()
impl GetStaticEquivalent_ for extern "C" fn()
This is the only function type that implements StableAbi so as to make it more obvious that functions involving lifetimes cannot implement this trait directly (because of higher ranked trait bounds).
type StaticEquivalent = extern "C" fn()
source§impl GetStaticEquivalent_ for unsafe extern "C" fn()
impl GetStaticEquivalent_ for unsafe extern "C" fn()
This is the only function type that implements StableAbi so as to make it more obvious that functions involving lifetimes cannot implement this trait directly (because of higher ranked trait bounds).