#[non_exhaustive]pub enum PowerSource {
UnknownPowerSource,
Ac,
Usb,
Wireless,
Unplugged,
UnknownValue(UnknownValue),
}Expand description
Type of the charger being used to charge the battery.
§Working with unknown values
This enum is defined as #[non_exhaustive] because Google Cloud may add
additional enum variants at any time. Adding new variants is not considered
a breaking change. Applications should write their code in anticipation of:
- New values appearing in future releases of the client library, and
- New values received dynamically, without application changes.
Please consult the Working with enums section in the user guide for some guidelines.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownPowerSource
Power source unknown.
Ac
Power source is an AC charger.
Usb
Power source is a USB port.
Wireless
Power source is wireless.
Unplugged
Battery is unplugged.
UnknownValue(UnknownValue)
If set, the enum was initialized with an unknown value.
Applications can examine the value using PowerSource::value or PowerSource::name.
Implementations§
Trait Implementations§
Source§impl Clone for PowerSource
impl Clone for PowerSource
Source§fn clone(&self) -> PowerSource
fn clone(&self) -> PowerSource
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 PowerSource
impl Debug for PowerSource
Source§impl Default for PowerSource
impl Default for PowerSource
Source§impl<'de> Deserialize<'de> for PowerSource
impl<'de> Deserialize<'de> for PowerSource
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 Display for PowerSource
impl Display for PowerSource
Source§impl From<&str> for PowerSource
impl From<&str> for PowerSource
Source§impl From<i32> for PowerSource
impl From<i32> for PowerSource
Source§impl PartialEq for PowerSource
impl PartialEq for PowerSource
Source§impl Serialize for PowerSource
impl Serialize for PowerSource
impl StructuralPartialEq for PowerSource
Auto Trait Implementations§
impl Freeze for PowerSource
impl RefUnwindSafe for PowerSource
impl Send for PowerSource
impl Sync for PowerSource
impl Unpin for PowerSource
impl UnsafeUnpin for PowerSource
impl UnwindSafe for PowerSource
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