Struct DeviceState

Source
#[repr(C)]
pub struct DeviceState {
Show 18 fields pub parent_obj: Object, pub id: *mut c_char, pub canonical_path: *mut c_char, pub realized: bool, pub pending_deleted_event: bool, pub pending_deleted_expires_ms: i64, pub hotplugged: c_int, pub allow_unplug_during_migration: bool, pub parent_bus: *mut BusState, pub gpios: NamedGPIOListHead, pub clocks: NamedClockListHead, pub child_bus: BusStateHead, pub num_child_bus: c_int, pub instance_id_alias: c_int, pub alias_required_for_version: c_int, pub reset: ResettableState, pub unplug_blockers: *mut GSList, pub mem_reentrancy_guard: MemReentrancyGuard,
}
Expand description

struct DeviceState - common device state, accessed with qdev helpers

This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures.

Fields§

§parent_obj: Object§id: *mut c_char

@id: global device id

§canonical_path: *mut c_char

@canonical_path: canonical path of realized device in the QOM tree

§realized: bool

@realized: has device been realized?

§pending_deleted_event: bool

@pending_deleted_event: track pending deletion events during unplug

§pending_deleted_expires_ms: i64

@pending_deleted_expires_ms: optional timeout for deletion events

§hotplugged: c_int

@hotplugged: was device added after PHASE_MACHINE_READY?

§allow_unplug_during_migration: bool

@allow_unplug_during_migration: can device be unplugged during migration

§parent_bus: *mut BusState

@parent_bus: bus this device belongs to

§gpios: NamedGPIOListHead

@gpios: QLIST of named GPIOs the device provides.

§clocks: NamedClockListHead

@clocks: QLIST of named clocks the device provides.

§child_bus: BusStateHead

@child_bus: QLIST of child buses

§num_child_bus: c_int

@num_child_bus: number of @child_bus entries

§instance_id_alias: c_int

@instance_id_alias: device alias for handling legacy migration setups

§alias_required_for_version: c_int

@alias_required_for_version: indicates @instance_id_alias is needed for migration

§reset: ResettableState

@reset: ResettableState for the device; handled by Resettable interface.

§unplug_blockers: *mut GSList

@unplug_blockers: list of reasons to block unplugging of device

§mem_reentrancy_guard: MemReentrancyGuard

@mem_reentrancy_guard: Is the device currently in mmio/pio/dma?

Used to prevent re-entrancy confusing things.

Trait Implementations§

Source§

impl Clone for DeviceState

Source§

fn clone(&self) -> DeviceState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DeviceState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DeviceState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for DeviceState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.