Enum google_api_proto::maps::fleetengine::v1::LocationPowerSaveMode
source · #[repr(i32)]pub enum LocationPowerSaveMode {
UnknownLocationPowerSaveMode = 0,
LocationModeNoChange = 1,
LocationModeGpsDisabledWhenScreenOff = 2,
LocationModeAllDisabledWhenScreenOff = 3,
LocationModeForegroundOnly = 4,
LocationModeThrottleRequestsWhenScreenOff = 5,
}
Expand description
How location features are configured to behave on the mobile device when the devices “battery saver” feature is on. (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode())
Variants§
UnknownLocationPowerSaveMode = 0
Undefined LocationPowerSaveMode
LocationModeNoChange = 1
Either the location providers shouldn’t be affected by battery saver, or battery saver is off.
LocationModeGpsDisabledWhenScreenOff = 2
The GPS based location provider should be disabled when battery saver is on and the device is non-interactive.
LocationModeAllDisabledWhenScreenOff = 3
All location providers should be disabled when battery saver is on and the device is non-interactive.
LocationModeForegroundOnly = 4
All the location providers will be kept available, but location fixes should only be provided to foreground apps.
LocationModeThrottleRequestsWhenScreenOff = 5
Location will not be turned off, but LocationManager will throttle all requests to providers when the device is non-interactive.
Implementations§
source§impl LocationPowerSaveMode
impl LocationPowerSaveMode
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of LocationPowerSaveMode
.
sourcepub fn from_i32(value: i32) -> Option<LocationPowerSaveMode>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<LocationPowerSaveMode>
Converts an i32
to a LocationPowerSaveMode
, or None
if value
is not a valid variant.
source§impl LocationPowerSaveMode
impl LocationPowerSaveMode
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for LocationPowerSaveMode
impl Clone for LocationPowerSaveMode
source§fn clone(&self) -> LocationPowerSaveMode
fn clone(&self) -> LocationPowerSaveMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocationPowerSaveMode
impl Debug for LocationPowerSaveMode
source§impl Default for LocationPowerSaveMode
impl Default for LocationPowerSaveMode
source§fn default() -> LocationPowerSaveMode
fn default() -> LocationPowerSaveMode
source§impl From<LocationPowerSaveMode> for i32
impl From<LocationPowerSaveMode> for i32
source§fn from(value: LocationPowerSaveMode) -> i32
fn from(value: LocationPowerSaveMode) -> i32
source§impl Hash for LocationPowerSaveMode
impl Hash for LocationPowerSaveMode
source§impl Ord for LocationPowerSaveMode
impl Ord for LocationPowerSaveMode
source§fn cmp(&self, other: &LocationPowerSaveMode) -> Ordering
fn cmp(&self, other: &LocationPowerSaveMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LocationPowerSaveMode
impl PartialEq for LocationPowerSaveMode
source§fn eq(&self, other: &LocationPowerSaveMode) -> bool
fn eq(&self, other: &LocationPowerSaveMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LocationPowerSaveMode
impl PartialOrd for LocationPowerSaveMode
source§fn partial_cmp(&self, other: &LocationPowerSaveMode) -> Option<Ordering>
fn partial_cmp(&self, other: &LocationPowerSaveMode) -> 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 moresource§impl TryFrom<i32> for LocationPowerSaveMode
impl TryFrom<i32> for LocationPowerSaveMode
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<LocationPowerSaveMode, UnknownEnumValue>
fn try_from(value: i32) -> Result<LocationPowerSaveMode, UnknownEnumValue>
impl Copy for LocationPowerSaveMode
impl Eq for LocationPowerSaveMode
impl StructuralPartialEq for LocationPowerSaveMode
Auto Trait Implementations§
impl Freeze for LocationPowerSaveMode
impl RefUnwindSafe for LocationPowerSaveMode
impl Send for LocationPowerSaveMode
impl Sync for LocationPowerSaveMode
impl Unpin for LocationPowerSaveMode
impl UnwindSafe for LocationPowerSaveMode
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request