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 core::cmp::Ordering

ยง

impl Freeze for Infallible

ยง

impl Freeze for AtomicOrdering

ยง

impl Freeze for OneSidedRangeBound

ยง

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

ยง

impl Freeze for bool

ยง

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 TryFromSliceError

ยง

impl Freeze for TryFromIntError

ยง

impl Freeze for RangeFull

ยง

impl Freeze for Alignment

ยง

impl Freeze for Utf8Error

ยง

impl Freeze for AtomicU32

ยง

impl Freeze for Duration

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

impl<I, F> Freeze for Map<I, F>
where 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<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 UnsafeCell<T>
where T: Freeze + ?Sized,

ยง

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

ยง

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,