pub struct EnumLayout { /* private fields */ }
Expand description
The layout for an enum. The enum layout is just a discriminate size and a tag layout.
Implementations§
Source§impl EnumLayout
impl EnumLayout
Sourcepub const fn new(
size: usize,
discriminant: PrimitiveLayout,
variants: &'static [EnumVariant],
) -> Self
pub const fn new( size: usize, discriminant: PrimitiveLayout, variants: &'static [EnumVariant], ) -> Self
Create a new enum layout
Trait Implementations§
Source§impl Clone for EnumLayout
impl Clone for EnumLayout
Source§fn clone(&self) -> EnumLayout
fn clone(&self) -> EnumLayout
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EnumLayout
impl Debug for EnumLayout
impl Copy for EnumLayout
Auto Trait Implementations§
impl Freeze for EnumLayout
impl RefUnwindSafe for EnumLayout
impl Send for EnumLayout
impl Sync for EnumLayout
impl Unpin for EnumLayout
impl UnwindSafe for EnumLayout
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