[][src]Struct fwupd_dbus::DeviceFlags

pub struct DeviceFlags { /* fields omitted */ }

Describes attributes of a device.

Methods

impl DeviceFlags[src]

pub const INTERNAL: DeviceFlags[src]

Device cannot be removed easily

pub const UPDATABLE: DeviceFlags[src]

Device is updatable in this or any other mode

pub const ONLY_OFFLINE: DeviceFlags[src]

Update can only be done from offline mode

pub const REQUIRE_AC: DeviceFlags[src]

Requires AC power

pub const LOCKED: DeviceFlags[src]

Is locked and can be unlocked

pub const SUPPORTED: DeviceFlags[src]

Is found in current metadata

pub const NEEDS_BOOTLOADER: DeviceFlags[src]

Requires a bootloader mode to be manually enabled by the user

pub const REGISTERED: DeviceFlags[src]

Has been registered with other plugins

pub const NEEDS_REBOOT: DeviceFlags[src]

Requires a reboot to apply firmware or to reload hardware

pub const REPORTED: DeviceFlags[src]

Has been reported to a metadata server

pub const NOTIFIED: DeviceFlags[src]

User has been notified

pub const USE_RUNTIME_VERSION: DeviceFlags[src]

Always use the runtime version rather than the bootloader

pub const INSTALL_PARENT_FIRST: DeviceFlags[src]

Install composite firmware on the parent before the child

pub const IS_BOOTLOADER: DeviceFlags[src]

Is currently in bootloader mode

pub const WAIT_FOR_REPLUG: DeviceFlags[src]

The hardware is waiting to be replugged

pub const IGNORE_VALIDATION: DeviceFlags[src]

Ignore validation safety checks when flashing this device

pub const TRUSTED: DeviceFlags[src]

Extra metadata can be exposed about this device

pub const NEEDS_SHUTDOWN: DeviceFlags[src]

Requires system shutdown to apply firmware

pub const ANOTHER_WRITE_REQUIRED: DeviceFlags[src]

Requires the update to be retried with a new plugin

pub const NO_AUTO_INSTANCE_IDS: DeviceFlags[src]

Do not add instance IDs from the device baseclass

pub const NEEDS_ACTIVATION: DeviceFlags[src]

Device update needs to be separately activated

pub const ENSURE_SEMVER: DeviceFlags[src]

Ensure the version is a valid semantic version, e.g. numbers separated with dots

pub const UNKNOWN: DeviceFlags[src]

pub const fn empty() -> DeviceFlags[src]

Returns an empty set of flags

pub const fn all() -> DeviceFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u64[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<DeviceFlags>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u64) -> DeviceFlags[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u64) -> DeviceFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: DeviceFlags) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: DeviceFlags) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: DeviceFlags)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: DeviceFlags)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: DeviceFlags)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: DeviceFlags, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for DeviceFlags[src]

impl BitAnd<DeviceFlags> for DeviceFlags[src]

type Output = DeviceFlags

The resulting type after applying the & operator.

fn bitand(self, other: DeviceFlags) -> DeviceFlags[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<DeviceFlags> for DeviceFlags[src]

fn bitand_assign(&mut self, other: DeviceFlags)[src]

Disables all flags disabled in the set.

impl BitOr<DeviceFlags> for DeviceFlags[src]

type Output = DeviceFlags

The resulting type after applying the | operator.

fn bitor(self, other: DeviceFlags) -> DeviceFlags[src]

Returns the union of the two sets of flags.

impl BitOrAssign<DeviceFlags> for DeviceFlags[src]

fn bitor_assign(&mut self, other: DeviceFlags)[src]

Adds the set of flags.

impl BitXor<DeviceFlags> for DeviceFlags[src]

type Output = DeviceFlags

The resulting type after applying the ^ operator.

fn bitxor(self, other: DeviceFlags) -> DeviceFlags[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<DeviceFlags> for DeviceFlags[src]

fn bitxor_assign(&mut self, other: DeviceFlags)[src]

Toggles the set of flags.

impl Clone for DeviceFlags[src]

impl Copy for DeviceFlags[src]

impl Debug for DeviceFlags[src]

impl Default for DeviceFlags[src]

impl Eq for DeviceFlags[src]

impl Extend<DeviceFlags> for DeviceFlags[src]

impl FromIterator<DeviceFlags> for DeviceFlags[src]

impl Hash for DeviceFlags[src]

impl LowerHex for DeviceFlags[src]

impl Not for DeviceFlags[src]

type Output = DeviceFlags

The resulting type after applying the ! operator.

fn not(self) -> DeviceFlags[src]

Returns the complement of this set of flags.

impl Octal for DeviceFlags[src]

impl Ord for DeviceFlags[src]

impl PartialEq<DeviceFlags> for DeviceFlags[src]

impl PartialOrd<DeviceFlags> for DeviceFlags[src]

impl StructuralEq for DeviceFlags[src]

impl StructuralPartialEq for DeviceFlags[src]

impl Sub<DeviceFlags> for DeviceFlags[src]

type Output = DeviceFlags

The resulting type after applying the - operator.

fn sub(self, other: DeviceFlags) -> DeviceFlags[src]

Returns the set difference of the two sets of flags.

impl SubAssign<DeviceFlags> for DeviceFlags[src]

fn sub_assign(&mut self, other: DeviceFlags)[src]

Disables all flags enabled in the set.

impl UpperHex for DeviceFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.