Skip to main content

PackedSubfield

Type Alias PackedSubfield 

Source
pub type PackedSubfield<P, FSub> = PackedPrimitiveType<<P as WithUnderlier>::Underlier, FSub>;
Expand description

The packed subfield type sharing the same underlier as the packed extension field type P.

P and PackedSubfield<P, FSub> have the same in-memory representation, differing only in the scalar type and preserving the order of the smaller elements. This is what makes the reinterpret casts (cast_bases_mut, cast_base_mut, cast_ext) sound: the FSub scalars of cast_bases_mut(exts) are exactly the scalars yielded by exts.iter().flat_map(|ext| ext.iter_bases()).

Aliased Type§

#[repr(transparent)]
pub struct PackedSubfield<P, FSub>(pub <P as WithUnderlier>::Underlier, pub PhantomData<FSub>);

Tuple Fields§

§0: <P as WithUnderlier>::Underlier§1: PhantomData<FSub>