#[repr(C)]pub union DevAddr {
pub raw: u32,
pub ptr: *mut u8,
}Expand description
Device address representation.
Device address fields in the resource table are commonly filled with pointer values that aren’t known until link time. In Rust, this is only possible using actual pointer types, but the resource table pointer fields are a fixed 32 bits.
In order for this crate to be useful on 64-bit platforms, device
addresses are represented using this union. It always contains a
raw integer field, and on systems with 32-bit pointers, it also
contains a ptr field.
Fields§
§raw: u32Raw address.
ptr: *mut u8Pointer address (only on 32-bit platforms).
Implementations§
Trait Implementations§
impl Copy for DevAddr
impl Sync for DevAddr
Pointers are not sync, but we necessarily need pointers stored in statics.
Auto Trait Implementations§
impl Freeze for DevAddr
impl RefUnwindSafe for DevAddr
impl !Send for DevAddr
impl Unpin for DevAddr
impl UnwindSafe for DevAddr
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