pub(crate) enum ElementTy<'tcx> {
Typed(Ty<'tcx>),
Generic,
}Expand description
The element type of an allocation’s contents, either a concrete [Ty] or
symbolic (Generic).
Typed carries a concrete Ty — the element type of a slice, the object
type of a Box<T>/struct, or u8 for a raw byte buffer — while Generic
marks a symbolic element type whose concrete Ty cannot be determined
(e.g. from_raw_parts::<T>; its size uses the shared symbolic sizeof_T
and its length must be materialized via set_slice_len).
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for ElementTy<'tcx>
impl<'tcx> !UnwindSafe for ElementTy<'tcx>
impl<'tcx> DynSend for ElementTy<'tcx>
impl<'tcx> DynSync for ElementTy<'tcx>
impl<'tcx> Freeze for ElementTy<'tcx>
impl<'tcx> Send for ElementTy<'tcx>
impl<'tcx> Sync for ElementTy<'tcx>
impl<'tcx> Unpin for ElementTy<'tcx>
impl<'tcx> UnsafeUnpin for ElementTy<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more