#[repr(C)]pub struct Repr {
pub base: BaseRepr,
pub packed: bool,
}
Expand description
Describes base representation of the type
Is the structure packed, is it laid out like a C struct, is it a transparent wrapper?
Fields§
§base: BaseRepr
Describes base layout representation of the type
packed: bool
Are the values tightly packed?
Note, that if struct is packed, the underlying values may not be aligned, and it is
undefined behavior to interact with unaligned values - first copy the value to aligned
buffer, before interacting with it (but first, make sure it is Copy
!)
Implementations§
Trait Implementations§
impl Copy for Repr
impl Eq for Repr
impl StructuralPartialEq for Repr
Auto Trait Implementations§
impl Freeze for Repr
impl RefUnwindSafe for Repr
impl Send for Repr
impl Sync for Repr
impl Unpin for Repr
impl UnwindSafe for Repr
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