pub struct DeviceStates {
pub devices: Vec<DeviceState>,
}Expand description
All device states, keyed by (mmio_slot, id) for stable ordering.
Fields§
§devices: Vec<DeviceState>Devices in MMIO-slot order.
Implementations§
Source§impl DeviceStates
impl DeviceStates
Sourcepub fn from_devices<I: IntoIterator<Item = DeviceState>>(iter: I) -> Self
pub fn from_devices<I: IntoIterator<Item = DeviceState>>(iter: I) -> Self
Build a DeviceStates from an iterable of DeviceState.
The constructor sorts by (mmio_slot, id) so the wire encoding is stable
across HashMap iteration order and across runs.
Trait Implementations§
Source§impl Clone for DeviceStates
impl Clone for DeviceStates
Source§fn clone(&self) -> DeviceStates
fn clone(&self) -> DeviceStates
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceStates
impl Debug for DeviceStates
Source§impl Default for DeviceStates
impl Default for DeviceStates
Source§fn default() -> DeviceStates
fn default() -> DeviceStates
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceStates
impl<'de> Deserialize<'de> for DeviceStates
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DeviceStates
impl PartialEq for DeviceStates
Source§fn eq(&self, other: &DeviceStates) -> bool
fn eq(&self, other: &DeviceStates) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceStates
impl Serialize for DeviceStates
impl Eq for DeviceStates
impl StructuralPartialEq for DeviceStates
Auto Trait Implementations§
impl Freeze for DeviceStates
impl RefUnwindSafe for DeviceStates
impl Send for DeviceStates
impl Sync for DeviceStates
impl Unpin for DeviceStates
impl UnsafeUnpin for DeviceStates
impl UnwindSafe for DeviceStates
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