#[non_exhaustive]pub struct DeviceSettings {
pub location_power_save_mode: LocationPowerSaveMode,
pub is_power_save_mode: bool,
pub is_interactive: bool,
pub battery_info: Option<BatteryInfo>,
/* private fields */
}Expand description
Information about various settings on the mobile device.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.location_power_save_mode: LocationPowerSaveModeHow location features are set to behave on the device when battery saver is on.
is_power_save_mode: boolWhether the device is currently in power save mode.
is_interactive: boolWhether the device is in an interactive state.
battery_info: Option<BatteryInfo>Information about the battery state.
Implementations§
Source§impl DeviceSettings
impl DeviceSettings
Sourcepub fn set_location_power_save_mode<T: Into<LocationPowerSaveMode>>(
self,
v: T,
) -> Self
pub fn set_location_power_save_mode<T: Into<LocationPowerSaveMode>>( self, v: T, ) -> Self
Sets the value of location_power_save_mode.
§Example
ⓘ
use google_maps_fleetengine_v1::model::LocationPowerSaveMode;
let x0 = DeviceSettings::new().set_location_power_save_mode(LocationPowerSaveMode::LocationModeNoChange);
let x1 = DeviceSettings::new().set_location_power_save_mode(LocationPowerSaveMode::LocationModeGpsDisabledWhenScreenOff);
let x2 = DeviceSettings::new().set_location_power_save_mode(LocationPowerSaveMode::LocationModeAllDisabledWhenScreenOff);Sourcepub fn set_is_power_save_mode<T: Into<bool>>(self, v: T) -> Self
pub fn set_is_power_save_mode<T: Into<bool>>(self, v: T) -> Self
Sets the value of is_power_save_mode.
§Example
ⓘ
let x = DeviceSettings::new().set_is_power_save_mode(true);Sourcepub fn set_is_interactive<T: Into<bool>>(self, v: T) -> Self
pub fn set_is_interactive<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_battery_info<T>(self, v: T) -> Selfwhere
T: Into<BatteryInfo>,
pub fn set_battery_info<T>(self, v: T) -> Selfwhere
T: Into<BatteryInfo>,
Sets the value of battery_info.
§Example
ⓘ
use google_maps_fleetengine_v1::model::BatteryInfo;
let x = DeviceSettings::new().set_battery_info(BatteryInfo::default()/* use setters */);Sourcepub fn set_or_clear_battery_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<BatteryInfo>,
pub fn set_or_clear_battery_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<BatteryInfo>,
Sets or clears the value of battery_info.
§Example
ⓘ
use google_maps_fleetengine_v1::model::BatteryInfo;
let x = DeviceSettings::new().set_or_clear_battery_info(Some(BatteryInfo::default()/* use setters */));
let x = DeviceSettings::new().set_or_clear_battery_info(None::<BatteryInfo>);Trait Implementations§
Source§impl Clone for DeviceSettings
impl Clone for DeviceSettings
Source§fn clone(&self) -> DeviceSettings
fn clone(&self) -> DeviceSettings
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 DeviceSettings
impl Debug for DeviceSettings
Source§impl Default for DeviceSettings
impl Default for DeviceSettings
Source§fn default() -> DeviceSettings
fn default() -> DeviceSettings
Returns the “default value” for a type. Read more
Source§impl Message for DeviceSettings
impl Message for DeviceSettings
Source§impl PartialEq for DeviceSettings
impl PartialEq for DeviceSettings
impl StructuralPartialEq for DeviceSettings
Auto Trait Implementations§
impl Freeze for DeviceSettings
impl RefUnwindSafe for DeviceSettings
impl Send for DeviceSettings
impl Sync for DeviceSettings
impl Unpin for DeviceSettings
impl UnsafeUnpin for DeviceSettings
impl UnwindSafe for DeviceSettings
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