pub enum StructLayout {
Fixed(FixedLayout),
Packed(PackedLayout),
}Variants§
Fixed(FixedLayout)
Packed(PackedLayout)
Implementations§
Source§impl StructLayout
impl StructLayout
pub fn align(&self) -> u32
pub fn is_packed(&self) -> bool
Sourcepub fn as_fixed(&self) -> &FixedLayout
pub fn as_fixed(&self) -> &FixedLayout
Access the fixed layout, panicking if this is a packed struct. Callers that never handle packed types (e.g. codegen, which rejects them) use this; the panic marks a real invariant break, not user error.
pub fn as_packed(&self) -> &PackedLayout
Trait Implementations§
Source§impl Clone for StructLayout
impl Clone for StructLayout
Source§fn clone(&self) -> StructLayout
fn clone(&self) -> StructLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructLayout
impl Debug for StructLayout
impl Eq for StructLayout
Source§impl PartialEq for StructLayout
impl PartialEq for StructLayout
impl StructuralPartialEq for StructLayout
Auto Trait Implementations§
impl Freeze for StructLayout
impl RefUnwindSafe for StructLayout
impl Send for StructLayout
impl Sync for StructLayout
impl Unpin for StructLayout
impl UnsafeUnpin for StructLayout
impl UnwindSafe for StructLayout
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