Trait Freeze
unsafe auto trait Freeze
Used to determine whether a type contains
any UnsafeCell internally, but not through an indirection.
This affects, for example, whether a static of that type is
placed in read-only static memory or writable static memory.
This can be used to declare that a constant with a generic type
will not contain interior mutability, and subsequently allow
placing the constant behind references.
Safety
This trait is a core part of the language, it is just expressed as a trait in libcore for convenience. Do not implement it for other types.
Implementors
impl<'a, T, P> Freeze for RSplitNMut<'a, T, P>impl Freeze for vector_unsigned_long_longimpl<T> Freeze for Poll<T>impl Freeze for TryFromCharErrorimpl Freeze for poly8x16x3_timpl<T> Freeze for Option<T>impl Freeze for uint64x2x2_timpl<H> Freeze for BuildHasherDefault<H>impl Freeze for m128iimpl<'a> Freeze for CharSearcher<'a>impl<T: PointeeSized> Freeze for *const T: TyPat { hir_id: HirId(DefId(0:11125 ~ core[fa69]::pat::{impl#4}).12), kind: NotNull, span: library/core/src/pat.rs:89:67: 89:72 (#0) }impl Freeze for BorrowMutErrorimpl Freeze for int8x16x2_timpl<F> Freeze for OnceWith<F>impl Freeze for float32x2x4_timpl<'a, 'b> Freeze for DebugSet<'a, 'b>impl Freeze for vector_bool_shortimpl<'a, P> Freeze for Matches<'a, P>impl Freeze for u8impl<T> Freeze for Yeet<T>impl Freeze for uint16x8_timpl<I> Freeze for Peekable<I>impl Freeze for uint32x2x3_timpl Freeze for Orderingimpl Freeze for AtomicI8impl Freeze for float64x2_timpl Freeze for Utf8Errorimpl<T, N: usize> Freeze for [Option<T>; N]impl Freeze for int16x4_timpl<'a> Freeze for Source<'a>impl<I> Freeze for Cycle<I>impl Freeze for poly16x4x2_timpl<A> Freeze for RangeInclusiveIter<A>impl Freeze for __m256impl<'a, T> Freeze for Windows<'a, T>impl Freeze for vector_bool_long_longimpl Freeze for RawWakerimpl<'a> Freeze for Request<'a>impl Freeze for CStrimpl Freeze for poly8x16x4_timpl<'a, A> Freeze for Iter<'a, A>impl Freeze for uint64x2x3_timpl Freeze for ReturnToArgimpl<'a> Freeze for EscapeAscii<'a>impl Freeze for m128impl Freeze for TryFromIntErrorimpl<'a, N: usize> Freeze for CharArraySearcher<'a, N>impl<T: PointeeSized> Freeze for *mut T: TyPat { hir_id: HirId(DefId(0:11127 ~ core[fa69]::pat::{impl#5}).12), kind: NotNull, span: library/core/src/pat.rs:91:65: 91:70 (#0) }impl<'b, T> Freeze for Ref<'b, T>impl Freeze for int8x16x3_timpl<A> Freeze for Repeat<A>impl Freeze for float32x4x2_timpl<'a, 'b> Freeze for DebugList<'a, 'b>impl Freeze for vector_signed_intimpl<'a, P> Freeze for RMatches<'a, P>impl Freeze for u16impl Freeze for TypeIdimpl Freeze for poly16x8_timpl<T> Freeze for Rev<T>impl Freeze for uint32x2x4_timpl Freeze for AtomicU8impl Freeze for float64x1x2_timpl Freeze for ParseBoolErrorimpl<T> Freeze for [T]impl Freeze for uint16x4_timpl<I> Freeze for Enumerate<I>impl Freeze for poly16x4x3_timpl<A> Freeze for RangeFromIter<A>impl Freeze for __m256dimpl<'a, T> Freeze for Chunks<'a, T>impl Freeze for vector_floatimpl Freeze for RawWakerVTableimpl Freeze for FromBytesWithNulErrorimpl Freeze for int16x4x2_timpl<'a, A> Freeze for IterMut<'a, A>impl Freeze for uint64x2x4_timpl<'a, T> Freeze for Iter<'a, T>impl Freeze for m128dimpl<'a, 'b, N: usize> Freeze for CharArrayRefSearcher<'a, 'b, N>impl<'b, T> Freeze for RefMut<'b, T>impl Freeze for int8x16x4_timpl<A> Freeze for RepeatN<A>impl Freeze for float32x4x3_timpl<'a, 'b> Freeze for DebugMap<'a, 'b>impl Freeze for vector_unsigned_intimpl<'a> Freeze for Lines<'a>impl Freeze for u32impl<T, N: usize> Freeze for IntoIter<T, N>impl Freeze for int32x4_timpl<T> Freeze for PhantomCovariant<T>impl Freeze for IntErrorKindimpl<I, St, F> Freeze for Scan<I, St, F>impl Freeze for uint32x4x2_timpl Freeze for AtomicI16impl Freeze for float64x1x3_timpl<'a> Freeze for Chars<'a>impl Freeze for strimpl Freeze for PhantomPinnedimpl Freeze for poly16x4_timpl<I, P> Freeze for Filter<I, P>impl Freeze for poly16x4x4_timpl<Idx> Freeze for Range<Idx>impl Freeze for __m512iimpl<'a, T> Freeze for ChunksMut<'a, T>impl Freeze for vector_doubleimpl<'a> Freeze for Context<'a>impl Freeze for FromBytesUntilNulErrorimpl Freeze for int16x4x3_timpl<A> Freeze for IntoIter<A>impl Freeze for poly64x1x2_timpl<'a, T> Freeze for IterMut<'a, T>impl Freeze for vector_signed_charimpl<'a, 'b> Freeze for CharSliceSearcher<'a, 'b>impl Freeze for Arrayimpl<T> Freeze for SyncUnsafeCell<T>impl Freeze for uint8x8x2_timpl<F> Freeze for RepeatWith<F>impl Freeze for float32x4x4_timpl<F> Freeze for FromFn<F>impl Freeze for vector_bool_intimpl<'a> Freeze for LinesAny<'a>impl Freeze for u64impl Freeze for TryFromSliceErrorimpl Freeze for uint32x4_timpl Freeze for AtomicOrderingimpl<I> Freeze for Skip<I>impl Freeze for uint32x4x3_timpl Freeze for AtomicU16impl Freeze for float64x1x4_timpl<'a> Freeze for CharIndices<'a>impl<T> Freeze for (T)impl<B, C> Freeze for ControlFlow<B, C>impl Freeze for int32x2_timpl<I, F> Freeze for FilterMap<I, F>impl Freeze for poly16x8x2_timpl<Idx> Freeze for RangeInclusive<Idx>impl Freeze for __m512impl<'a, T> Freeze for ChunksExact<'a, T>impl<N: usize> Freeze for LaneCount<N>impl<'a> Freeze for ContextBuilder<'a>impl<'a> Freeze for Bytes<'a>impl Freeze for int16x4x4_timpl Freeze for BasicBlockimpl<A> Freeze for OptionFlatten<A>impl Freeze for poly64x1x3_timpl<'a, T, P> Freeze for Split<'a, T, P>impl Freeze for vector_unsigned_charimpl<'a, F> Freeze for CharPredicateSearcher<'a, F>impl Freeze for ParseCharErrorimpl Freeze for uint8x8x3_timpl<T, F> Freeze for Successors<T, F>impl Freeze for int64x1x2_timpl<T> Freeze for NumBuffer<T>impl Freeze for vector_floatimpl<'a> Freeze for SplitWhitespace<'a>impl Freeze for u128impl Freeze for AsciiCharimpl Freeze for float32x4_timpl<I, P> Freeze for SkipWhile<I, P>impl Freeze for uint32x4x4_timpl Freeze for AtomicI32impl Freeze for float64x2x2_timpl<'a> Freeze for Bytes<'a>impl Freeze for f16impl<Y, R> Freeze for CoroutineState<Y, R>impl Freeze for uint32x2_timpl<I, U, F> Freeze for FlatMap<I, U, F>impl Freeze for poly16x8x3_timpl<Idx> Freeze for RangeFrom<Idx>impl Freeze for __m512dimpl<'a, T> Freeze for ChunksExactMut<'a, T>impl<T, N: usize> Freeze for Mask<T, N>impl Freeze for Wakerimpl<'a> Freeze for PhantomInvariantLifetime<'a>impl<'a> Freeze for VaList<'a>impl Freeze for int16x8x2_timpl Freeze for objc_classimpl Freeze for poly64x1x4_timpl Freeze for FpCategoryimpl<'a, T, P> Freeze for SplitInclusive<'a, T, P>impl Freeze for vector_bool_charimpl Freeze for TypeKindimpl<'a, 'b> Freeze for StrSearcher<'a, 'b>impl Freeze for CharTryFromErrorimpl Freeze for uint8x8x4_timpl Freeze for IpAddrimpl Freeze for int64x1x3_timpl Freeze for Alignmentimpl Freeze for vector_signed_longimpl Freeze for Infallibleimpl Freeze for Lastimpl<'a> Freeze for SplitAsciiWhitespace<'a>impl Freeze for isizeimpl Freeze for EscapeDefaultimpl Freeze for int64x2_timpl<I> Freeze for StepBy<I>impl Freeze for float16x4x2_timpl Freeze for AtomicU32impl Freeze for float64x2x3_timpl<'a, P> Freeze for Split<'a, P>impl Freeze for f32impl Freeze for RangeFullimpl Freeze for float32x2_timpl<I> Freeze for Flatten<I>impl Freeze for poly16x8x4_timpl<Idx> Freeze for RangeToInclusive<Idx>impl Freeze for __m128bhimpl<'a, T, N: usize> Freeze for ArrayWindows<'a, T, N>impl<T, N: usize> Freeze for Simd<T, N>impl Freeze for LocalWakerimpl Freeze for c_voidimpl Freeze for int16x8x3_timpl Freeze for objc_selectorimpl Freeze for poly64x2x2_timpl<T, F> Freeze for DropGuard<T, F>impl<'a, T, P> Freeze for SplitMut<'a, T, P>impl Freeze for vector_signed_shortimpl<'a> Freeze for Utf8Chunk<'a>impl<I> Freeze for DecodeUtf16<I>impl Freeze for uint8x16x2_timpl Freeze for Ipv4Addrimpl Freeze for int64x1x4_timpl Freeze for Errorimpl Freeze for vector_unsigned_longimpl Freeze for Localityimpl<'a, P> Freeze for SplitInclusive<'a, P>impl Freeze for usizeimpl<I> Freeze for FromIter<I>impl Freeze for uint64x2_timpl<I> Freeze for Take<I>impl Freeze for float16x4x3_timpl Freeze for AtomicI64impl Freeze for float64x2x4_timpl<'a, P> Freeze for RSplit<'a, P>impl Freeze for f64impl<Idx> Freeze for Range<Idx>impl Freeze for int64x1_timpl<I> Freeze for Fuse<I>impl Freeze for int32x2x2_timpl Freeze for UnwindTerminateReasonimpl<T, E> Freeze for Result<T, E>impl Freeze for __m256bhimpl<'a, T> Freeze for RChunks<'a, T>impl Freeze for boolimpl<T> Freeze for Saturating<T>impl<T> Freeze for NonZero<T>impl Freeze for Layoutimpl<'data> Freeze for BorrowedBuf<'data>impl Freeze for int16x8x4_timpl<'a> Freeze for Location<'a>impl Freeze for poly64x2x3_timpl<'a, T, P> Freeze for SplitInclusiveMut<'a, T, P>impl Freeze for vector_unsigned_shortimpl<'a> Freeze for Utf8Chunks<'a>impl Freeze for DecodeUtf16Errorimpl Freeze for uint8x16x3_timpl<Idx> Freeze for Clamp<Idx>impl Freeze for Ipv6Addrimpl Freeze for int64x2x2_timpl Freeze for Signimpl Freeze for vector_bool_longimpl<'a> Freeze for EncodeUtf16<'a>impl<Ret, T> Freeze for fn(_: T) -> Retimpl<'a> Freeze for PhantomContravariantLifetime<'a>impl Freeze for ByteStrimpl Freeze for poly64x2_timpl<I, P> Freeze for TakeWhile<I, P>impl Freeze for float16x4x4_timpl Freeze for AtomicU64impl Freeze for v128impl<'a, P> Freeze for SplitTerminator<'a, P>impl Freeze for f128impl<Idx> Freeze for RangeFrom<Idx>impl Freeze for uint64x1_timpl<I, F> Freeze for Inspect<I, F>impl Freeze for int32x2x3_timpl<'a, T> Freeze for Iter<'a, T>impl Freeze for __m512bhimpl<'a, T> Freeze for RChunksMut<'a, T>impl Freeze for neverimpl Freeze for LayoutErrorimpl<'a> Freeze for BorrowedCursor<'a>impl Freeze for uint16x4x2_timpl<'a> Freeze for PanicInfo<'a>impl Freeze for poly64x2x4_timpl<Dyn> Freeze for DynMetadata<Dyn>impl<'a, T, P> Freeze for RSplit<'a, T, P>impl Freeze for vector_bool_shortimpl Freeze for Durationimpl Freeze for EscapeUnicodeimpl Freeze for uint8x16x4_timpl Freeze for Ipv6MulticastScopeimpl Freeze for int64x2x3_timpl Freeze for DebugAsHeximpl Freeze for vector_doubleimpl<'a> Freeze for EscapeDebug<'a>impl<T: PointeeSized> Freeze for crate::cell::UnsafeCell<T>impl<T, F = fn() -> T> Freeze for LazyCell<T, F>impl Freeze for float16x4_timpl<A, B> Freeze for Zip<A, B>impl Freeze for float16x8x2_timpl Freeze for AtomicIsizeimpl Freeze for vector_signed_charimpl Freeze for Typeimpl<'a, P> Freeze for RSplitTerminator<'a, P>impl Freeze for i8impl<Idx> Freeze for RangeTo<Idx>impl Freeze for poly64x1_timpl<I> Freeze for Intersperse<I>impl Freeze for int32x2x4_timpl<T> Freeze for PhantomInvariant<T>impl Freeze for Assumeimpl<'a, T> Freeze for IterMut<'a, T>impl Freeze for __m128himpl<'a, T> Freeze for RChunksExact<'a, T>impl Freeze for charimpl<'a> Freeze for PhantomCovariantLifetime<'a>impl Freeze for Tupleimpl Freeze for AllocErrorimpl<T> Freeze for MaybeUninit<T>impl<I, N: usize> Freeze for ArrayChunks<I, N>impl Freeze for uint16x4x3_timpl<'a> Freeze for PanicMessage<'a>impl Freeze for CpuidResultimpl<'a, T, P> Freeze for RSplitMut<'a, T, P>impl Freeze for vector_signed_intimpl Freeze for TryFromFloatSecsErrorimpl<T> Freeze for NonNull<T>impl Freeze for EscapeDefaultimpl Freeze for poly8x8x2_timpl Freeze for AddrParseErrorimpl Freeze for int64x2x4_timpl Freeze for FormattingOptionsimpl Freeze for f16x2impl<'a> Freeze for EscapeDefault<'a>impl<T: PointeeSized> Freeze for *const Timpl<T> Freeze for OnceCell<T>impl Freeze for float16x8_timpl<T> Freeze for Empty<T>impl Freeze for float16x8x3_timpl Freeze for UnwindActionArgimpl Freeze for AtomicUsizeimpl Freeze for vector_unsigned_charimpl<'a, P> Freeze for SplitN<'a, P>impl Freeze for i16impl<Idx> Freeze for RangeInclusive<Idx>impl Freeze for int8x16_timpl<I, G> Freeze for IntersperseWith<I, G>impl Freeze for int32x4x2_timpl<T> Freeze for IntoIter<T>impl Freeze for __m256himpl<'a, T> Freeze for RChunksExactMut<'a, T>impl Freeze for ()impl Freeze for SYimpl<'a, I> Freeze for ByRefSized<'a, I>impl Freeze for uint16x4x4_timpl<T> Freeze for AssertUnwindSafe<T>impl Freeze for __m128iimpl<'a, T, P> Freeze for SplitN<'a, T, P>impl Freeze for vector_unsigned_intimpl<T> Freeze for ManuallyDrop<T>impl<T> Freeze for Pending<T>impl Freeze for EscapeDebugimpl Freeze for poly8x8x3_timpl Freeze for SocketAddrimpl Freeze for uint64x1x2_timpl<'a> Freeze for Formatter<'a>impl Freeze for m256iimpl<'a> Freeze for EscapeUnicode<'a>impl<T: PointeeSized> Freeze for *mut Timpl<T> Freeze for Cell<T>impl Freeze for int8x8x2_timpl<P> Freeze for MaybeDangling<P>impl<G> Freeze for FromCoroutine<G>impl Freeze for float16x8x4_timpl<T> Freeze for Wrapping<T>impl<T> Freeze for Exclusive<T>impl Freeze for vector_bool_charimpl<'a, P> Freeze for RSplitN<'a, P>impl Freeze for i32impl<Idx> Freeze for RangeToInclusive<Idx>impl Freeze for uint8x16_timpl<I, F> Freeze for Map<I, F>impl Freeze for int32x4x3_timpl Freeze for AtomicBoolimpl Freeze for __m512himpl<'a, T, P> Freeze for ChunkBy<'a, T, P>impl<T, N: usize> Freeze for [MaybeUninit<T>; N]impl<T: PointeeSized> Freeze for PhantomData<T>impl Freeze for int8x8_timpl<A, B> Freeze for Chain<A, B>impl Freeze for uint16x8x2_timpl<T> Freeze for UnsafePinned<T>impl Freeze for __m128impl<'a, T, P> Freeze for RSplitN<'a, T, P>impl Freeze for vector_bool_intimpl<F> Freeze for PollFn<F>impl Freeze for ToLowercaseimpl Freeze for poly8x8x4_timpl Freeze for SocketAddrV4impl Freeze for uint64x1x3_timpl<'a> Freeze for Arguments<'a>impl Freeze for m256impl<'a> Freeze for Utf8Pattern<'a>impl<T: PointeeSized> Freeze for &Timpl<T> Freeze for RefCell<T>impl Freeze for int8x8x3_timpl<F> Freeze for FromFn<F>impl Freeze for float32x2x2_timpl<'a, 'b> Freeze for DebugStruct<'a, 'b>impl Freeze for vector_signed_shortimpl<'a, P> Freeze for MatchIndices<'a, P>impl Freeze for i64impl<T> Freeze for Bound<T>impl Freeze for poly8x16_timpl<T> Freeze for Discriminant<T>impl<I, P> Freeze for MapWhile<I, P>impl Freeze for int32x4x4_timpl<T> Freeze for AtomicPtr<T>impl Freeze for bf16impl<'a, T, P> Freeze for ChunkByMut<'a, T, P>impl<N: usize> Freeze for [u8; N]impl Freeze for uint8x8_timpl<I> Freeze for Cloned<I>impl Freeze for uint16x8x3_timpl Freeze for Alignmentimpl<Ptr> Freeze for Pin<Ptr>impl Freeze for __m128dimpl<'a, T, P> Freeze for SplitNMut<'a, T, P>impl Freeze for vector_signed_long_longimpl<T> Freeze for Ready<T>impl Freeze for ParseIntErrorimpl Freeze for ToUppercaseimpl Freeze for poly8x16x2_timpl<T> Freeze for PhantomContravariant<T>impl Freeze for SocketAddrV6impl Freeze for uint64x1x4_timpl<T> Freeze for Reverse<T>impl Freeze for SipHasherimpl Freeze for m256dimpl Freeze for SearchStepimpl<T: PointeeSized> Freeze for &mut Timpl Freeze for BorrowErrorimpl Freeze for int8x8x4_timpl<T> Freeze for Once<T>impl Freeze for float32x2x3_timpl<'a, 'b> Freeze for DebugTuple<'a, 'b>impl Freeze for vector_unsigned_shortimpl<'a, P> Freeze for RMatchIndices<'a, P>impl Freeze for i128impl Freeze for Fieldimpl Freeze for OneSidedRangeBoundimpl Freeze for int16x8_timpl<I, F, N: usize> Freeze for MapWindows<I, F, N>impl Freeze for uint32x2x2_timpl Freeze for Orderingimpl Freeze for float64x1_timpl Freeze for GetDisjointMutErrorimpl<T, N: usize> Freeze for [T; N]impl Freeze for SimdAlignimpl Freeze for poly8x8_timpl<I> Freeze for Copied<I>impl Freeze for uint16x8x4_timpl<A> Freeze for RangeIter<A>impl Freeze for __m256i