[][src]Struct axp173::ChargingVoltage

pub struct ChargingVoltage { /* fields omitted */ }

Possible values of charger's regulation voltage in volts.

Implementations

impl ChargingVoltage[src]

pub const V4_1: ChargingVoltage[src]

4.1 Volts

pub const V4_15: ChargingVoltage[src]

4.15 Volts

pub const V4_2: ChargingVoltage[src]

4.2 Volts (default)

pub const V4_36: ChargingVoltage[src]

4.36 Volts

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

Returns an empty set of flags

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

Returns the set containing all flags.

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

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u8) -> Option<ChargingVoltage>[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: u8) -> ChargingVoltage[src]

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

pub const unsafe fn from_bits_unchecked(bits: u8) -> ChargingVoltage[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: ChargingVoltage) -> bool[src]

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

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

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

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

Inserts the specified flags in-place.

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

Removes the specified flags in-place.

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

Toggles the specified flags in-place.

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

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

Trait Implementations

impl Binary for ChargingVoltage[src]

impl BitAnd<ChargingVoltage> for ChargingVoltage[src]

type Output = ChargingVoltage

The resulting type after applying the & operator.

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

Returns the intersection between the two sets of flags.

impl BitAndAssign<ChargingVoltage> for ChargingVoltage[src]

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

Disables all flags disabled in the set.

impl BitOr<ChargingVoltage> for ChargingVoltage[src]

type Output = ChargingVoltage

The resulting type after applying the | operator.

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

Returns the union of the two sets of flags.

impl BitOrAssign<ChargingVoltage> for ChargingVoltage[src]

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

Adds the set of flags.

impl BitXor<ChargingVoltage> for ChargingVoltage[src]

type Output = ChargingVoltage

The resulting type after applying the ^ operator.

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

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

impl BitXorAssign<ChargingVoltage> for ChargingVoltage[src]

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

Toggles the set of flags.

impl Clone for ChargingVoltage[src]

impl Copy for ChargingVoltage[src]

impl Debug for ChargingVoltage[src]

impl Eq for ChargingVoltage[src]

impl Extend<ChargingVoltage> for ChargingVoltage[src]

impl FromIterator<ChargingVoltage> for ChargingVoltage[src]

impl Hash for ChargingVoltage[src]

impl LowerHex for ChargingVoltage[src]

impl Not for ChargingVoltage[src]

type Output = ChargingVoltage

The resulting type after applying the ! operator.

pub fn not(self) -> ChargingVoltage[src]

Returns the complement of this set of flags.

impl Octal for ChargingVoltage[src]

impl Ord for ChargingVoltage[src]

impl PartialEq<ChargingVoltage> for ChargingVoltage[src]

impl PartialOrd<ChargingVoltage> for ChargingVoltage[src]

impl StructuralEq for ChargingVoltage[src]

impl StructuralPartialEq for ChargingVoltage[src]

impl Sub<ChargingVoltage> for ChargingVoltage[src]

type Output = ChargingVoltage

The resulting type after applying the - operator.

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

Returns the set difference of the two sets of flags.

impl SubAssign<ChargingVoltage> for ChargingVoltage[src]

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

Disables all flags enabled in the set.

impl UpperHex for ChargingVoltage[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<T> From<T> for T[src]

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

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.