pub struct DeviceContext {Show 41 fields
pub name: Annotated<String>,
pub family: Annotated<String>,
pub model: Annotated<String>,
pub model_id: Annotated<String>,
pub arch: Annotated<String>,
pub battery_level: Annotated<f64>,
pub orientation: Annotated<String>,
pub manufacturer: Annotated<String>,
pub brand: Annotated<String>,
pub screen_resolution: Annotated<String>,
pub screen_width_pixels: Annotated<u64>,
pub screen_height_pixels: Annotated<u64>,
pub screen_density: Annotated<f64>,
pub screen_dpi: Annotated<u64>,
pub online: Annotated<bool>,
pub charging: Annotated<bool>,
pub low_memory: Annotated<bool>,
pub simulator: Annotated<bool>,
pub memory_size: Annotated<u64>,
pub free_memory: Annotated<u64>,
pub usable_memory: Annotated<u64>,
pub storage_size: Annotated<u64>,
pub free_storage: Annotated<u64>,
pub external_storage_size: Annotated<u64>,
pub external_free_storage: Annotated<u64>,
pub boot_time: Annotated<String>,
pub timezone: Annotated<String>,
pub locale: Annotated<String>,
pub processor_count: Annotated<u64>,
pub cpu_description: Annotated<String>,
pub processor_frequency: Annotated<u64>,
pub device_type: Annotated<String>,
pub battery_status: Annotated<String>,
pub device_unique_identifier: Annotated<String>,
pub supports_vibration: Annotated<bool>,
pub supports_accelerometer: Annotated<bool>,
pub supports_gyroscope: Annotated<bool>,
pub supports_audio: Annotated<bool>,
pub supports_location_service: Annotated<bool>,
pub uuid: Annotated<Uuid>,
pub other: Object<Value>,
}Expand description
Device information.
Device context describes the device that caused the event. This is most appropriate for mobile applications.
Fields§
§name: Annotated<String>Name of the device.
family: Annotated<String>Family of the device model.
This is usually the common part of model names across generations. For instance, iPhone
would be a reasonable family, so would be Samsung Galaxy.
model: Annotated<String>Device model.
This, for example, can be Samsung Galaxy S3.
model_id: Annotated<String>Device model (internal identifier).
An internal hardware revision to identify the device exactly.
arch: Annotated<String>Native cpu architecture of the device.
battery_level: Annotated<f64>Current battery level in %.
If the device has a battery, this can be a floating point value defining the battery level (in the range 0-100).
orientation: Annotated<String>Current screen orientation.
This can be a string portrait or landscape to define the orientation of a device.
manufacturer: Annotated<String>Manufacturer of the device.
brand: Annotated<String>Brand of the device.
screen_resolution: Annotated<String>Device screen resolution.
(e.g.: 800x600, 3040x1444)
screen_width_pixels: Annotated<u64>Width of the screen in pixels.
screen_height_pixels: Annotated<u64>Height of the screen in pixels.
screen_density: Annotated<f64>Device screen density.
screen_dpi: Annotated<u64>Screen density as dots-per-inch.
online: Annotated<bool>Whether the device was online or not.
charging: Annotated<bool>Whether the device was charging or not.
low_memory: Annotated<bool>Whether the device was low on memory.
simulator: Annotated<bool>Simulator/prod indicator.
memory_size: Annotated<u64>Total memory available in bytes.
free_memory: Annotated<u64>How much memory is still available in bytes.
usable_memory: Annotated<u64>How much memory is usable for the app in bytes.
storage_size: Annotated<u64>Total storage size of the device in bytes.
free_storage: Annotated<u64>How much storage is free in bytes.
external_storage_size: Annotated<u64>Total size of the attached external storage in bytes (eg: android SDK card).
external_free_storage: Annotated<u64>Free size of the attached external storage in bytes (eg: android SDK card).
boot_time: Annotated<String>Indicator when the device was booted.
timezone: Annotated<String>Timezone of the device.
locale: Annotated<String>ISO 639-1 code of the locale the device is set to.
processor_count: Annotated<u64>Number of “logical processors”.
For example, 8.
cpu_description: Annotated<String>CPU description.
For example, Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz.
processor_frequency: Annotated<u64>Processor frequency in MHz.
Note that the actual CPU frequency might vary depending on current load and power conditions, especially on low-powered devices like phones and laptops.
device_type: Annotated<String>Kind of device the application is running on.
For example, Unknown, Handheld, Console, Desktop.
battery_status: Annotated<String>Status of the device’s battery.
For example, Unknown, Charging, Discharging, NotCharging, Full.
device_unique_identifier: Annotated<String>Unique device identifier.
supports_vibration: Annotated<bool>Whether vibration is available on the device.
supports_accelerometer: Annotated<bool>Whether the accelerometer is available on the device.
supports_gyroscope: Annotated<bool>Whether the gyroscope is available on the device.
supports_audio: Annotated<bool>Whether audio is available on the device.
supports_location_service: Annotated<bool>Whether location support is available on the device.
uuid: Annotated<Uuid>UUID of the device.
other: Object<Value>Additional arbitrary fields for forwards compatibility
Trait Implementations§
Source§impl Clone for DeviceContext
impl Clone for DeviceContext
Source§fn clone(&self) -> DeviceContext
fn clone(&self) -> DeviceContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceContext
impl Debug for DeviceContext
Source§impl Default for DeviceContext
impl Default for DeviceContext
Source§fn default() -> DeviceContext
fn default() -> DeviceContext
Source§impl DefaultContext for DeviceContext
impl DefaultContext for DeviceContext
Source§fn default_key() -> &'static str
fn default_key() -> &'static str
Contexts.