Skip to main content

Freeze

Trait Freeze 

Source
pub unsafe auto trait Freeze { }
๐Ÿ”ฌThis is a nightly-only experimental API. (freeze #121675)
Expand description

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ยง

Auto implementorsยง

ยง

impl !Freeze for AtomicBool

ยง

impl !Freeze for AtomicU8

ยง

impl !Freeze for AtomicU16

ยง

impl !Freeze for AtomicU32

ยง

impl !Freeze for AtomicU64

ยง

impl !Freeze for AtomicUsize

ยง

impl<T> !Freeze for Cell<T>

ยง

impl<T> !Freeze for RefCell<T>

ยง

impl<T> !Freeze for SyncUnsafeCell<T>

ยง

impl Freeze for AsciiChar

ยง

impl Freeze for core::cmp::Ordering

ยง

impl Freeze for Infallible

ยง

impl Freeze for FromBytesWithNulError

ยง

impl Freeze for c_void

ยง

impl Freeze for core::fmt::Alignment

ยง

impl Freeze for DebugAsHex

ยง

impl Freeze for Sign

ยง

impl Freeze for AtomicOrdering

ยง

impl Freeze for FpCategory

ยง

impl Freeze for IntErrorKind

ยง

impl Freeze for OneSidedRangeBound

ยง

impl Freeze for SearchStep

ยง

impl Freeze for core::sync::atomic::Ordering

ยง

impl Freeze for bool

ยง

impl Freeze for char

ยง

impl Freeze for f16

ยง

impl Freeze for f32

ยง

impl Freeze for f64

ยง

impl Freeze for i8

ยง

impl Freeze for i16

ยง

impl Freeze for i32

ยง

impl Freeze for i64

ยง

impl Freeze for i128

ยง

impl Freeze for isize

ยง

impl Freeze for !

ยง

impl Freeze for str

ยง

impl Freeze for u8

ยง

impl Freeze for u16

ยง

impl Freeze for u32

ยง

impl Freeze for u64

ยง

impl Freeze for u128

ยง

impl Freeze for ()

ยง

impl Freeze for usize

ยง

impl Freeze for Layout

ยง

impl Freeze for TypeId

ยง

impl Freeze for float16x4_t

ยง

impl Freeze for float16x8_t

ยง

impl Freeze for float32x2_t

ยง

impl Freeze for float32x2x2_t

ยง

impl Freeze for float32x4_t

ยง

impl Freeze for float32x4x2_t

ยง

impl Freeze for float64x1_t

ยง

impl Freeze for float64x1x2_t

ยง

impl Freeze for float64x1x3_t

ยง

impl Freeze for float64x1x4_t

ยง

impl Freeze for float64x2_t

ยง

impl Freeze for float64x2x2_t

ยง

impl Freeze for float64x2x3_t

ยง

impl Freeze for float64x2x4_t

ยง

impl Freeze for int8x8_t

ยง

impl Freeze for int8x8x2_t

ยง

impl Freeze for int8x16_t

ยง

impl Freeze for int8x16x2_t

ยง

impl Freeze for int16x4_t

ยง

impl Freeze for int16x4x2_t

ยง

impl Freeze for int16x8_t

ยง

impl Freeze for int16x8x2_t

ยง

impl Freeze for int32x2_t

ยง

impl Freeze for int32x2x2_t

ยง

impl Freeze for int32x4_t

ยง

impl Freeze for int32x4x2_t

ยง

impl Freeze for int64x1_t

ยง

impl Freeze for int64x2_t

ยง

impl Freeze for poly8x8_t

ยง

impl Freeze for poly8x16_t

ยง

impl Freeze for poly16x4_t

ยง

impl Freeze for poly16x8_t

ยง

impl Freeze for poly64x1_t

ยง

impl Freeze for poly64x2_t

ยง

impl Freeze for uint8x8_t

ยง

impl Freeze for uint8x8x2_t

ยง

impl Freeze for uint8x16_t

ยง

impl Freeze for uint16x4_t

ยง

impl Freeze for uint16x8_t

ยง

impl Freeze for uint32x2_t

ยง

impl Freeze for uint32x4_t

ยง

impl Freeze for uint64x1_t

ยง

impl Freeze for uint64x2_t

ยง

impl Freeze for TryFromSliceError

ยง

impl Freeze for EscapeDefault

ยง

impl Freeze for ByteStr

ยง

impl Freeze for BorrowError

ยง

impl Freeze for BorrowMutError

ยง

impl Freeze for CharTryFromError

ยง

impl Freeze for DecodeUtf16Error

ยง

impl Freeze for EscapeDebug

ยง

impl Freeze for CStr

ยง

impl Freeze for Error

ยง

impl Freeze for FormattingOptions

ยง

impl Freeze for ParseIntError

ยง

impl Freeze for TryFromIntError

ยง

impl Freeze for RangeFull

ยง

impl Freeze for core::ptr::Alignment

ยง

impl Freeze for Utf8Error

ยง

impl Freeze for Duration

ยง

impl Freeze for TryFromFloatSecsError

ยง

impl<'a> Freeze for Arguments<'a>

ยง

impl<'a> Freeze for Formatter<'a>

ยง

impl<'a> Freeze for Location<'a>

ยง

impl<'a> Freeze for PanicInfo<'a>

ยง

impl<'a> Freeze for PanicMessage<'a>

ยง

impl<'a> Freeze for CharSearcher<'a>

ยง

impl<'a> Freeze for Bytes<'a>

ยง

impl<'a> Freeze for CharIndices<'a>

ยง

impl<'a> Freeze for Chars<'a>

ยง

impl<'a, 'b> Freeze for DebugList<'a, 'b>

ยง

impl<'a, 'b> Freeze for DebugMap<'a, 'b>

ยง

impl<'a, 'b> Freeze for DebugSet<'a, 'b>

ยง

impl<'a, 'b> Freeze for DebugStruct<'a, 'b>

ยง

impl<'a, 'b> Freeze for DebugTuple<'a, 'b>

ยง

impl<'a, 'b> Freeze for StrSearcher<'a, 'b>

ยง

impl<'a, A> Freeze for core::option::Iter<'a, A>

ยง

impl<'a, A> Freeze for core::option::IterMut<'a, A>

ยง

impl<'a, P> Freeze for SplitInclusive<'a, P>
where <P as Pattern>::Searcher<'a>: Freeze,

ยง

impl<'a, T> Freeze for Chunks<'a, T>

ยง

impl<'a, T> Freeze for ChunksExact<'a, T>

ยง

impl<'a, T> Freeze for ChunksExactMut<'a, T>

ยง

impl<'a, T> Freeze for ChunksMut<'a, T>

ยง

impl<'a, T> Freeze for core::slice::Iter<'a, T>

ยง

impl<'a, T> Freeze for core::slice::IterMut<'a, T>

ยง

impl<'a, T> Freeze for Windows<'a, T>

ยง

impl<'b, T> Freeze for Ref<'b, T>
where T: ?Sized,

ยง

impl<'b, T> Freeze for RefMut<'b, T>
where T: ?Sized,

ยง

impl<A> Freeze for core::option::IntoIter<A>
where A: Freeze,

ยง

impl<A, B> Freeze for Chain<A, B>
where A: Freeze, B: Freeze,

ยง

impl<A, B> Freeze for Zip<A, B>
where A: Freeze, B: Freeze,

ยง

impl<B, C> Freeze for ControlFlow<B, C>
where C: Freeze, B: Freeze,

ยง

impl<Dyn> Freeze for DynMetadata<Dyn>
where Dyn: ?Sized,

ยง

impl<F> Freeze for core::fmt::FromFn<F>
where F: Freeze,

ยง

impl<F> Freeze for core::iter::FromFn<F>
where F: Freeze,

ยง

impl<I> Freeze for DecodeUtf16<I>
where I: Freeze,

ยง

impl<I> Freeze for Cloned<I>
where I: Freeze,

ยง

impl<I> Freeze for Copied<I>
where I: Freeze,

ยง

impl<I> Freeze for Enumerate<I>
where I: Freeze,

ยง

impl<I> Freeze for Fuse<I>
where I: Freeze,

ยง

impl<I> Freeze for Skip<I>
where I: Freeze,

ยง

impl<I> Freeze for StepBy<I>
where I: Freeze,

ยง

impl<I> Freeze for Take<I>
where I: Freeze,

ยง

impl<I, F> Freeze for Map<I, F>
where I: Freeze, F: Freeze,

ยง

impl<I, P> Freeze for Filter<I, P>
where I: Freeze, P: Freeze,

ยง

impl<I, P> Freeze for TakeWhile<I, P>
where I: Freeze, P: Freeze,

ยง

impl<I, U, F> Freeze for FlatMap<I, U, F>
where <U as IntoIterator>::IntoIter: Freeze, I: Freeze, F: Freeze,

ยง

impl<Idx> Freeze for Range<Idx>
where Idx: Freeze,

ยง

impl<Idx> Freeze for RangeFrom<Idx>
where Idx: Freeze,

ยง

impl<Idx> Freeze for RangeInclusive<Idx>
where Idx: Freeze,

ยง

impl<Idx> Freeze for RangeTo<Idx>
where Idx: Freeze,

ยง

impl<Idx> Freeze for RangeToInclusive<Idx>
where Idx: Freeze,

ยง

impl<P> Freeze for MaybeDangling<P>
where P: Freeze + ?Sized,

ยง

impl<Ret, T> Freeze for fn(Tโ‚, Tโ‚‚, โ€ฆ, Tโ‚™) -> Ret

ยง

impl<T> Freeze for Bound<T>
where T: Freeze,

ยง

impl<T> Freeze for Option<T>
where T: Freeze,

ยง

impl<T> Freeze for [T]
where T: Freeze,

ยง

impl<T> Freeze for (Tโ‚, Tโ‚‚, โ€ฆ, Tโ‚™)
where T: Freeze,

ยง

impl<T> Freeze for NumBuffer<T>

ยง

impl<T> Freeze for Rev<T>
where T: Freeze,

ยง

impl<T> Freeze for Discriminant<T>

ยง

impl<T> Freeze for ManuallyDrop<T>
where T: Freeze + ?Sized,

ยง

impl<T> Freeze for NonZero<T>
where <T as ZeroablePrimitive>::NonZeroInner: Freeze,

ยง

impl<T> Freeze for NonNull<T>
where T: ?Sized,

ยง

impl<T> Freeze for MaybeUninit<T>
where T: Freeze,

ยง

impl<T, E> Freeze for Result<T, E>
where T: Freeze, E: Freeze,

ยง

impl<T, const N: usize> Freeze for [T; N]
where T: Freeze,

ยง

impl<T, const N: usize> Freeze for core::array::IntoIter<T, N>
where T: Freeze,

ยง

impl<T, const N: usize> Freeze for [MaybeUninit<T>; N]
where T: Freeze,

ยง

impl<const N: usize> Freeze for [u8; N]