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 Freeze for FromBytesUntilNulErrorimpl<T> Freeze for IntoIter<T>impl<'a, N: usize> Freeze for CharArraySearcher<'a, N>impl Freeze for uint16x4x2_timpl Freeze for float64x1x2_timpl Freeze for u64impl Freeze for ParseIntErrorimpl<I, N: usize> Freeze for ArrayChunks<I, N>impl<'a, 'b> Freeze for DebugSet<'a, 'b>impl<'a> Freeze for Utf8Chunks<'a>impl Freeze for poly16x4x2_timpl Freeze for v128impl<T: PointeeSized> Freeze for *const Timpl Freeze for TryFromIntErrorimpl<I> Freeze for Enumerate<I>impl Freeze for Errorimpl<T> Freeze for Poll<T>impl Freeze for int32x2x2_timpl Freeze for vector_bool_shortimpl<I, F> Freeze for Inspect<I, F>impl Freeze for SipHasherimpl Freeze for LocalWakerimpl Freeze for uint32x2x2_timpl Freeze for vector_unsigned_longimpl<T> Freeze for Saturating<T>impl<I> Freeze for Peekable<I>impl<'a, T, P> Freeze for SplitInclusive<'a, T, P>impl Freeze for uint8x8_timpl Freeze for float16x4x2_timpl Freeze for m256dimpl<I> Freeze for Take<I>impl<'a, T, P> Freeze for RSplitN<'a, T, P>impl Freeze for uint32x2_timpl Freeze for float32x2x2_timpl Freeze for vector_bool_charimpl<T> Freeze for MaybeUninit<T>impl<Idx> Freeze for RangeFrom<Idx>impl<T> Freeze for Once<T>impl<'a, T> Freeze for ChunksExact<'a, T>impl Freeze for uint8x16_timpl Freeze for int64x1x2_timpl Freeze for vector_bool_intimpl<T> Freeze for Yeet<T>impl Freeze for IpAddrimpl<'a, T> Freeze for RChunksExactMut<'a, T>impl Freeze for uint32x4_timpl Freeze for uint64x1x2_timpl Freeze for HvxVectorimpl<'a> Freeze for PhantomCovariantLifetime<'a>impl<I> Freeze for FromIter<I>impl Freeze for SocketAddrV4impl<'a> Freeze for Chars<'a>impl Freeze for float16x8_timpl Freeze for poly64x1x2_timpl<T, N: usize> Freeze for Mask<T, N>impl Freeze for BorrowErrorimpl<A> Freeze for OptionFlatten<A>impl<'a, P> Freeze for RSplitTerminator<'a, P>impl Freeze for int8x16x4_timpl Freeze for CpuidResultimpl<T, N: usize> Freeze for [MaybeUninit<T>; N]impl Freeze for Genericimpl Freeze for CharTryFromErrorimpl<Dyn> Freeze for DynMetadata<Dyn>impl<T> Freeze for AssertUnwindSafe<T>impl<'a, P> Freeze for RMatches<'a, P>impl Freeze for uint8x16x4_timpl Freeze for __m256dimpl<T> Freeze for (T)impl Freeze for ToUppercaseimpl<Idx> Freeze for Range<Idx>impl<'a> Freeze for EncodeUtf16<'a>impl Freeze for poly8x16x4_timpl Freeze for __m512bhimpl Freeze for i16impl Freeze for FromBytesWithNulErrorimpl<'a, T> Freeze for IterMut<'a, T>impl<'a> Freeze for CharSearcher<'a>impl Freeze for int16x8x4_timpl Freeze for float64x2_timpl Freeze for u32impl<'a> Freeze for BorrowedCursor<'a>impl<'a, 'b> Freeze for DebugTuple<'a, 'b>impl<'a> Freeze for Utf8Chunk<'a>impl Freeze for uint16x8x4_timpl Freeze for float64x2x4_timpl<T: PointeeSized> Freeze for UnsafeCell<T>impl<I> Freeze for Cycle<I>impl Freeze for Alignmentimpl<T> Freeze for Ready<T>impl Freeze for poly16x8x4_timpl Freeze for vector_unsigned_shortimpl<T: PointeeSized> Freeze for *mut T: TyPat { hir_id: HirId(DefId(0:11283 ~ core[1801]::pat::{impl#5}).12), kind: NotNull, span: library/core/src/pat.rs:91:65: 91:70 (#0) }impl<T> Freeze for Wrapping<T>impl Freeze for Lastimpl<T> Freeze for Discriminant<T>impl<I> Freeze for Fuse<I>impl<'a> Freeze for Arguments<'a>impl Freeze for Wakerimpl Freeze for int32x4x4_timpl Freeze for vector_signed_longimpl<I, F, N: usize> Freeze for MapWindows<I, F, N>impl<'a, T, P> Freeze for Split<'a, T, P>impl<T> Freeze for NonNull<T>impl Freeze for int8x8_timpl Freeze for uint32x4x4_timpl Freeze for m256impl<I> Freeze for StepBy<I>impl<'a, T, P> Freeze for SplitN<'a, T, P>impl Freeze for int32x2_timpl Freeze for float16x8x4_timpl Freeze for vector_unsigned_charimpl Freeze for Variantimpl<Idx> Freeze for Range<Idx>impl<F> Freeze for FromFn<F>impl<'a, T> Freeze for ChunksMut<'a, T>impl Freeze for int8x16_timpl Freeze for float32x4x4_timpl Freeze for vector_unsigned_intimpl Freeze for OneSidedRangeBoundimpl<T, F> Freeze for Successors<T, F>impl<'a, T> Freeze for RChunksExact<'a, T>impl Freeze for int32x4_timpl Freeze for int64x2x4_timpl Freeze for vector_doubleimpl Freeze for Strimpl Freeze for EscapeDefaultimpl Freeze for SocketAddrimpl Freeze for ParseBoolErrorimpl Freeze for float16x4_timpl Freeze for uint64x2x4_timpl Freeze for HvxVectorPredimpl Freeze for Boolimpl<T> Freeze for RefCell<T>impl<A> Freeze for IntoIter<A>impl<'a, P> Freeze for SplitTerminator<'a, P>impl Freeze for int8x16x3_timpl Freeze for poly64x2x4_timpl Freeze for ()impl Freeze for ParseCharErrorimpl Freeze for SimdAlignimpl<'a> Freeze for PanicMessage<'a>impl<'a, P> Freeze for Matches<'a, P>impl Freeze for uint8x16x3_timpl Freeze for __m256impl Freeze for strimpl Freeze for Referenceimpl<T> Freeze for NonZero<T>impl Freeze for EscapeDebugimpl<A> Freeze for RangeFromIter<A>impl<'a, P> Freeze for SplitInclusive<'a, P>impl Freeze for poly8x16x3_timpl Freeze for __m256bhimpl Freeze for i8impl Freeze for CStrimpl<'a, T> Freeze for Iter<'a, T>impl Freeze for SearchStepimpl Freeze for int16x8x3_timpl Freeze for float64x1_timpl Freeze for u16impl<P> Freeze for MaybeDangling<P>impl<'data> Freeze for BorrowedBuf<'data>impl<'a, 'b> Freeze for DebugStruct<'a, 'b>impl<'a, 'b> Freeze for StrSearcher<'a, 'b>impl Freeze for uint16x8x3_timpl Freeze for float64x2x3_timpl<Ret, T> Freeze for fn(_: T) -> Retimpl Freeze for Pointerimpl<I> Freeze for Copied<I>impl<T> Freeze for NumBuffer<T>impl<F> Freeze for PollFn<F>impl Freeze for poly16x8x3_timpl Freeze for vector_signed_shortimpl<T: PointeeSized> Freeze for *const T: TyPat { hir_id: HirId(DefId(0:11281 ~ core[1801]::pat::{impl#4}).12), kind: NotNull, span: library/core/src/pat.rs:89:67: 89:72 (#0) }impl Freeze for Enumimpl<I> Freeze for Flatten<I>impl<'a> Freeze for Formatter<'a>impl<'a> Freeze for ContextBuilder<'a>impl Freeze for int32x4x3_timpl Freeze for vector_floatimpl<I, P> Freeze for MapWhile<I, P>impl<'a, T> Freeze for IterMut<'a, T>impl Freeze for SYimpl Freeze for uint32x4x3_timpl Freeze for m256iimpl<I, P> Freeze for SkipWhile<I, P>impl<'a, T, P> Freeze for RSplitMut<'a, T, P>impl Freeze for poly16x4_timpl Freeze for float16x8x3_timpl Freeze for vector_signed_charimpl<T, VARIANT: u32, FIELD: u32> Freeze for FieldRepresentingType<T, VARIANT, FIELD>impl Freeze for RangeFullimpl<G> Freeze for FromCoroutine<G>impl<'a, T> Freeze for Chunks<'a, T>impl Freeze for poly64x1_timpl Freeze for float32x4x3_timpl Freeze for vector_signed_intimpl<T> Freeze for Bound<T>impl<F> Freeze for RepeatWith<F>impl<'a, T> Freeze for RChunksMut<'a, T>impl Freeze for poly16x8_timpl Freeze for int64x2x3_timpl Freeze for vector_floatimpl Freeze for AsciiCharimpl Freeze for AddrParseErrorimpl Freeze for Utf8Errorimpl Freeze for poly64x2_timpl Freeze for uint64x2x3_timpl Freeze for HvxVectorPairimpl Freeze for Abiimpl<T> Freeze for Cell<T>impl<'a, A> Freeze for IterMut<'a, A>impl<'a, P> Freeze for RSplit<'a, P>impl Freeze for int8x16x2_timpl Freeze for poly64x2x3_timpl Freeze for charimpl<T> Freeze for TraitImpl<T>impl<Idx> Freeze for Clamp<Idx>impl<T> Freeze for SyncUnsafeCell<T>impl<'a> Freeze for PanicInfo<'a>impl<'a, P> Freeze for RMatchIndices<'a, P>impl Freeze for uint8x16x2_timpl Freeze for __m256iimpl<T> Freeze for [T]impl Freeze for EscapeDefaultimpl<A> Freeze for RangeInclusiveIter<A>impl<'a> Freeze for SplitAsciiWhitespace<'a>impl Freeze for poly8x16x2_timpl Freeze for __m128bhimpl Freeze for f128impl Freeze for BasicBlockimpl Freeze for CharCaseimpl<T, E> Freeze for Result<T, E>impl<'a> Freeze for Utf8Pattern<'a>impl Freeze for int16x8x2_timpl Freeze for bf16impl Freeze for u8impl<'a> Freeze for Source<'a>impl Freeze for Lifetimeimpl Freeze for c_voidimpl<T> Freeze for Exclusive<T>impl<'a, F> Freeze for CharPredicateSearcher<'a, F>impl Freeze for uint16x8x2_timpl Freeze for float64x2x2_timpl Freeze for usizeimpl<I> Freeze for Cloned<I>impl<F> Freeze for FromFn<F>impl<T> Freeze for Pending<T>impl Freeze for poly16x8x2_timpl Freeze for vector_bool_charimpl<T: PointeeSized> Freeze for &mut Timpl<T> Freeze for Reverse<T>impl Freeze for Fieldimpl<I, U, F> Freeze for FlatMap<I, U, F>impl Freeze for FormattingOptionsimpl<'a> Freeze for Context<'a>impl Freeze for int32x4x2_timpl Freeze for vector_bool_intimpl<I, F> Freeze for Map<I, F>impl<'a, T> Freeze for Iter<'a, T>impl Freeze for AllocErrorimpl Freeze for uint32x4x2_timpl Freeze for f16x2impl<I> Freeze for Skip<I>impl<'a, T, P> Freeze for RSplit<'a, T, P>impl Freeze for uint16x4_timpl Freeze for float16x8x2_timpl Freeze for m128dimpl Freeze for Arrayimpl<Y, R> Freeze for CoroutineState<Y, R>impl<T> Freeze for Empty<T>impl<'a, T> Freeze for Windows<'a, T>impl Freeze for uint64x1_timpl Freeze for float32x4x2_timpl Freeze for vector_bool_shortimpl<Idx> Freeze for RangeToInclusive<Idx>impl<A> Freeze for RepeatN<A>impl<'a, T> Freeze for RChunks<'a, T>impl Freeze for uint16x8_timpl Freeze for int64x2x2_timpl Freeze for vector_bool_long_longimpl Freeze for TryFromSliceErrorimpl Freeze for Ipv6MulticastScopeimpl Freeze for GetDisjointMutErrorimpl Freeze for uint64x2_timpl Freeze for uint64x2x2_timpl Freeze for HvxVectorimpl Freeze for TypeKindimpl Freeze for Structimpl<T> Freeze for PhantomCovariant<T>impl<T> Freeze for OnceCell<T>impl<'a, A> Freeze for Iter<'a, A>impl<'a, P> Freeze for Split<'a, P>impl Freeze for int8x8x4_timpl Freeze for poly64x2x2_timpl Freeze for neverimpl<'b, T> Freeze for RefMut<'b, T>impl<'a> Freeze for Location<'a>impl Freeze for AtomicOrderingimpl<'a, P> Freeze for MatchIndices<'a, P>impl Freeze for uint8x8x4_timpl Freeze for __m128dimpl<T, N: usize> Freeze for [Option<T>; N]impl Freeze for EscapeUnicodeimpl<A> Freeze for RangeIter<A>impl<'a> Freeze for SplitWhitespace<'a>impl Freeze for poly8x8x4_timpl Freeze for __m512dimpl Freeze for f64impl Freeze for Tupleimpl Freeze for Unionimpl Freeze for Charimpl Freeze for TryFromCharErrorimpl<Idx> Freeze for RangeToInclusive<Idx>impl<'a> Freeze for EscapeUnicode<'a>impl Freeze for int16x4x4_timpl Freeze for __m512himpl Freeze for i128impl<T> Freeze for PhantomContravariant<T>impl<'a> Freeze for VaList<'a>impl Freeze for Orderingimpl<'a, 'b> Freeze for CharSliceSearcher<'a, 'b>impl Freeze for uint16x4x4_timpl Freeze for float64x1x4_timpl Freeze for isizeimpl<T, F> Freeze for DropGuard<T, F>impl<A, B> Freeze for Chain<A, B>impl<'a, 'b> Freeze for DebugMap<'a, 'b>impl Freeze for TryFromFloatSecsErrorimpl Freeze for poly16x4x4_timpl Freeze for vector_unsigned_charimpl<T: PointeeSized> Freeze for &Timpl Freeze for Intimpl Freeze for UnwindTerminateReasonimpl<I, F> Freeze for FilterMap<I, F>impl Freeze for DebugAsHeximpl Freeze for RawWakerVTableimpl Freeze for int32x2x4_timpl Freeze for vector_unsigned_intimpl Freeze for GenericTypeimpl<I, G> Freeze for IntersperseWith<I, G>impl<'a> Freeze for EscapeAscii<'a>impl Freeze for LayoutErrorimpl Freeze for uint32x2x4_timpl Freeze for vector_doubleimpl Freeze for FpCategoryimpl<'a> Freeze for PhantomInvariantLifetime<'a>impl<T> Freeze for PhantomInvariant<T>impl<I, St, F> Freeze for Scan<I, St, F>impl<'a, T, P> Freeze for SplitInclusiveMut<'a, T, P>impl Freeze for int16x4_timpl Freeze for float16x4x4_timpl Freeze for m128impl Freeze for FnPtrimpl<B, C> Freeze for ControlFlow<B, C>impl<A, B> Freeze for Zip<A, B>impl<'a, T, P> Freeze for RSplitNMut<'a, T, P>impl Freeze for int64x1_timpl Freeze for float32x2x4_timpl Freeze for vector_unsigned_shortimpl Freeze for Typeimpl<Idx> Freeze for RangeInclusive<Idx>impl<A> Freeze for Repeat<A>impl<'a, T, N: usize> Freeze for ArrayWindows<'a, T, N>impl Freeze for int16x8_timpl Freeze for int64x1x4_timpl Freeze for vector_unsigned_long_longimpl<T, N: usize> Freeze for IntoIter<T, N>impl Freeze for Ipv6Addrimpl<'a, T, P> Freeze for ChunkByMut<'a, T, P>impl Freeze for int64x2_timpl Freeze for uint64x1x4_timpl Freeze for HvxVectorPredimpl Freeze for Sliceimpl Freeze for ReturnToArgimpl<T, F = fn() -> T> Freeze for LazyCell<T, F>impl<T> Freeze for Option<T>impl<'a> Freeze for Bytes<'a>impl Freeze for int8x8x3_timpl Freeze for poly64x1x4_timpl Freeze for boolimpl<'b, T> Freeze for Ref<'b, T>impl Freeze for objc_selectorimpl<'a, P> Freeze for RSplitN<'a, P>impl Freeze for uint8x8x3_timpl Freeze for __m128impl<T, N: usize> Freeze for [T; N]impl Freeze for Orderingimpl<'a> Freeze for Request<'a>impl Freeze for DecodeUtf16Errorimpl<Ptr> Freeze for Pin<Ptr>impl<'a> Freeze for LinesAny<'a>impl Freeze for poly8x8x3_timpl Freeze for __m512impl Freeze for f32impl Freeze for ParseFloatErrorimpl Freeze for DynTraitimpl Freeze for Localityimpl Freeze for ToLowercaseimpl<Idx> Freeze for RangeFrom<Idx>impl<'a> Freeze for EscapeDefault<'a>impl Freeze for int16x4x3_timpl Freeze for __m256himpl Freeze for i64impl<'a> Freeze for PhantomContravariantLifetime<'a>impl<'a> Freeze for Bytes<'a>impl<T> Freeze for Atomic<T>impl<'a, 'b, N: usize> Freeze for CharArrayRefSearcher<'a, 'b, N>impl Freeze for uint16x4x3_timpl Freeze for float64x1x3_timpl Freeze for u128impl<'a, I> Freeze for ByRefSized<'a, I>impl<'a, 'b> Freeze for DebugList<'a, 'b>impl Freeze for Durationimpl Freeze for poly16x4x3_timpl Freeze for vector_signed_charimpl<T: PointeeSized> Freeze for *mut Timpl Freeze for DynTraitPredicateimpl<I, P> Freeze for Filter<I, P>impl Freeze for Signimpl Freeze for RawWakerimpl Freeze for int32x2x3_timpl Freeze for vector_signed_intimpl<I> Freeze for Intersperse<I>impl<H> Freeze for BuildHasherDefault<H>impl Freeze for Layoutimpl Freeze for uint32x2x3_timpl Freeze for vector_bool_longimpl<T: PointeeSized> Freeze for PhantomData<T>impl<T> Freeze for Rev<T>impl<'a, T, P> Freeze for SplitMut<'a, T, P>impl Freeze for poly8x8_timpl Freeze for float16x4x3_timpl Freeze for m128iimpl Freeze for Traitimpl Freeze for Floatimpl Freeze for UnwindActionArgimpl Freeze for PhantomPinnedimpl<I, P> Freeze for TakeWhile<I, P>impl<'a, T, P> Freeze for SplitNMut<'a, T, P>impl Freeze for float32x2_timpl Freeze for float32x2x3_timpl Freeze for vector_signed_shortimpl Freeze for IntErrorKindimpl Freeze for Constimpl<Idx> Freeze for RangeTo<Idx>impl<F> Freeze for OnceWith<F>impl<'a, T> Freeze for ChunksExactMut<'a, T>impl Freeze for poly8x16_timpl Freeze for int64x1x3_timpl Freeze for vector_signed_long_longimpl<T> Freeze for ManuallyDrop<T>impl Freeze for Assumeimpl Freeze for TypeIdimpl Freeze for Ipv4Addrimpl<'a, T, P> Freeze for ChunkBy<'a, T, P>impl Freeze for float32x4_timpl Freeze for uint64x1x3_timpl Freeze for HvxVectorPairimpl Freeze for ByteStrimpl Freeze for SocketAddrV6impl<'a> Freeze for CharIndices<'a>impl Freeze for int8x8x2_timpl Freeze for poly64x1x3_timpl<T, N: usize> Freeze for Simd<T, N>impl Freeze for Infallibleimpl Freeze for BorrowMutErrorimpl Freeze for objc_classimpl<'a, P> Freeze for SplitN<'a, P>impl Freeze for uint8x8x2_timpl Freeze for __m128iimpl<N: usize> Freeze for [u8; N]impl<I> Freeze for DecodeUtf16<I>impl<T> Freeze for UnsafePinned<T>impl<'a> Freeze for Lines<'a>impl Freeze for poly8x8x2_timpl Freeze for __m512iimpl Freeze for f16impl Freeze for Alignmentimpl Freeze for ToTitlecaseimpl<Idx> Freeze for RangeInclusive<Idx>impl<'a> Freeze for EscapeDebug<'a>impl Freeze for int16x4x2_timpl Freeze for __m128himpl Freeze for i32