pub struct InitEntry {
pub offset: u64,
pub value: ExprId,
pub bit_offset: u32,
pub bit_width: u32,
}Expand description
One value an initializer stores, and where it goes.
The offsets are from the start of the object being initialized, so a nested aggregate has already been walked and there is nothing left to elide or designate.
Fields§
§offset: u64The byte offset from the start of the object.
value: ExprIdThe value, already converted to the type of what is at that offset.
bit_offset: u32The bit offset within the byte at offset, for a bit-field.
bit_width: u32The width in bits, for a bit-field, and zero for everything else. A bit-field of width zero has no name and cannot be initialized, so zero is free to mean this instead.
Implementations§
Trait Implementations§
impl Copy for InitEntry
impl Eq for InitEntry
impl StructuralPartialEq for InitEntry
Auto Trait Implementations§
impl Freeze for InitEntry
impl RefUnwindSafe for InitEntry
impl Send for InitEntry
impl Sync for InitEntry
impl Unpin for InitEntry
impl UnsafeUnpin for InitEntry
impl UnwindSafe for InitEntry
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