pub struct HotplugEvent {
pub event_type: HotplugType,
pub device_info: u64,
pub timestamp: u64,
pub is_add: bool,
}Expand description
A hot-plug event notification
Fields§
§event_type: HotplugTypeType of device being hot-plugged
device_info: u64Device-specific info (slot/cpu_id/dimm_id encoded as u64)
timestamp: u64Timestamp (monotonic counter)
is_add: boolWhether this is an add (true) or remove (false) event
Implementations§
Source§impl HotplugEvent
impl HotplugEvent
Sourcepub fn new(
event_type: HotplugType,
device_info: u64,
timestamp: u64,
is_add: bool,
) -> Self
pub fn new( event_type: HotplugType, device_info: u64, timestamp: u64, is_add: bool, ) -> Self
Create a new hot-plug event
Sourcepub fn cpu_remove(cpu_id: u32, timestamp: u64) -> Self
pub fn cpu_remove(cpu_id: u32, timestamp: u64) -> Self
Create a CPU remove event
Sourcepub fn memory_add(dimm_slot: u32, timestamp: u64) -> Self
pub fn memory_add(dimm_slot: u32, timestamp: u64) -> Self
Create a memory add event
Sourcepub fn memory_remove(dimm_slot: u32, timestamp: u64) -> Self
pub fn memory_remove(dimm_slot: u32, timestamp: u64) -> Self
Create a memory remove event
Sourcepub fn pci_remove(slot_id: u32, timestamp: u64) -> Self
pub fn pci_remove(slot_id: u32, timestamp: u64) -> Self
Create a PCI device remove event
Trait Implementations§
Source§impl Clone for HotplugEvent
impl Clone for HotplugEvent
Source§fn clone(&self) -> HotplugEvent
fn clone(&self) -> HotplugEvent
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HotplugEvent
impl RefUnwindSafe for HotplugEvent
impl Send for HotplugEvent
impl Sync for HotplugEvent
impl Unpin for HotplugEvent
impl UnwindSafe for HotplugEvent
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)