Struct driver_virtio::pci::Status
pub struct Status { /* private fields */ }Expand description
The status register in PCI configuration space.
Implementations§
§impl Status
impl Status
pub const INTERRUPT_STATUS: Status = Self{ bits: 1 << 3,}
pub const INTERRUPT_STATUS: Status = Self{ bits: 1 << 3,}
The state of the device’s INTx# signal.
pub const CAPABILITIES_LIST: Status = Self{ bits: 1 << 4,}
pub const CAPABILITIES_LIST: Status = Self{ bits: 1 << 4,}
The device has a linked list of capabilities.
pub const MHZ_66_CAPABLE: Status = Self{ bits: 1 << 5,}
pub const MHZ_66_CAPABLE: Status = Self{ bits: 1 << 5,}
The device is capabile of running at 66 MHz rather than 33 MHz.
pub const FAST_BACK_TO_BACK_CAPABLE: Status = Self{ bits: 1 << 7,}
pub const FAST_BACK_TO_BACK_CAPABLE: Status = Self{ bits: 1 << 7,}
The device can accept fast back-to-back transactions not from the same agent.
pub const MASTER_DATA_PARITY_ERROR: Status = Self{ bits: 1 << 8,}
pub const MASTER_DATA_PARITY_ERROR: Status = Self{ bits: 1 << 8,}
The bus agent observed a parity error (if parity error handling is enabled).
pub const SIGNALED_TARGET_ABORT: Status = Self{ bits: 1 << 11,}
pub const SIGNALED_TARGET_ABORT: Status = Self{ bits: 1 << 11,}
A target device terminated a transaction with target-abort.
pub const RECEIVED_TARGET_ABORT: Status = Self{ bits: 1 << 12,}
pub const RECEIVED_TARGET_ABORT: Status = Self{ bits: 1 << 12,}
A master device transaction was terminated with target-abort.
pub const RECEIVED_MASTER_ABORT: Status = Self{ bits: 1 << 13,}
pub const RECEIVED_MASTER_ABORT: Status = Self{ bits: 1 << 13,}
A master device transaction was terminated with master-abort.
pub const SIGNALED_SYSTEM_ERROR: Status = Self{ bits: 1 << 14,}
pub const SIGNALED_SYSTEM_ERROR: Status = Self{ bits: 1 << 14,}
A device asserts SERR#.
pub const DETECTED_PARITY_ERROR: Status = Self{ bits: 1 << 15,}
pub const DETECTED_PARITY_ERROR: Status = Self{ bits: 1 << 15,}
The device detects a parity error, even if parity error handling is disabled.
pub const fn from_bits(bits: u16) -> Option<Status>
pub const fn from_bits(bits: u16) -> Option<Status>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u16) -> Status
pub const fn from_bits_truncate(bits: u16) -> Status
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u16) -> Status
pub const unsafe fn from_bits_unchecked(bits: u16) -> Status
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags! macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked() has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
pub const fn intersects(&self, other: Status) -> bool
pub const fn intersects(&self, other: Status) -> bool
Returns true if there are flags common to both self and other.
pub const fn contains(&self, other: Status) -> bool
pub const fn contains(&self, other: Status) -> bool
Returns true if all of the flags in other are contained within self.
pub fn set(&mut self, other: Status, value: bool)
pub fn set(&mut self, other: Status, value: bool)
Inserts or removes the specified flags depending on the passed value.
pub const fn intersection(self, other: Status) -> Status
pub const fn intersection(self, other: Status) -> Status
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
pub const fn union(self, other: Status) -> Status
pub const fn union(self, other: Status) -> Status
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both (see Self::symmetric_difference if that
is undesirable).
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
pub const fn difference(self, other: Status) -> Status
pub const fn difference(self, other: Status) -> Status
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
pub const fn symmetric_difference(self, other: Status) -> Status
pub const fn symmetric_difference(self, other: Status) -> Status
Returns the symmetric difference between the flags
in self and other.
Specifically, the returned set contains the flags present which
are present in self or other, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self and other.
This is equivalent to using the ^ operator (e.g.
ops::BitXor), as in flags ^ other.
pub const fn complement(self) -> Status
pub const fn complement(self) -> Status
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all() and self (e.g. Self::all() - self)
This is equivalent to using the ! operator (e.g.
ops::Not), as in !flags.
Trait Implementations§
§impl BitAndAssign<Status> for Status
impl BitAndAssign<Status> for Status
§fn bitand_assign(&mut self, other: Status)
fn bitand_assign(&mut self, other: Status)
Disables all flags disabled in the set.
§impl BitOrAssign<Status> for Status
impl BitOrAssign<Status> for Status
§fn bitor_assign(&mut self, other: Status)
fn bitor_assign(&mut self, other: Status)
Adds the set of flags.
§impl BitXorAssign<Status> for Status
impl BitXorAssign<Status> for Status
§fn bitxor_assign(&mut self, other: Status)
fn bitxor_assign(&mut self, other: Status)
Toggles the set of flags.
§impl Extend<Status> for Status
impl Extend<Status> for Status
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Status>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = Status>,
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl FromIterator<Status> for Status
impl FromIterator<Status> for Status
§impl Ord for Status
impl Ord for Status
§impl PartialOrd<Status> for Status
impl PartialOrd<Status> for Status
§fn partial_cmp(&self, other: &Status) -> Option<Ordering>
fn partial_cmp(&self, other: &Status) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more§impl SubAssign<Status> for Status
impl SubAssign<Status> for Status
§fn sub_assign(&mut self, other: Status)
fn sub_assign(&mut self, other: Status)
Disables all flags enabled in the set.