pub struct Device { /* private fields */ }Expand description
Fields that describe a device instance and its characteristics. Data collected for applications and processes running on a (mobile) device can be enriched with these fields to describe the identity, type and other characteristics of the device.
This field group definition is based on the Device namespace of the OpenTelemetry Semantic Conventions (https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/).
Implementations§
Source§impl Device
impl Device
Sourcepub fn get_id(&self) -> Option<&String>
pub fn get_id(&self) -> Option<&String>
The unique identifier of a device. The identifier must not change across application sessions but stay fixex for an instance of a (mobile) device.
On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android, this value must be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application.
For GDPR and data protection law reasons this identifier should not carry information that would allow to identify a user.
Sourcepub fn set_id(&mut self, id_arg: String)
pub fn set_id(&mut self, id_arg: String)
The unique identifier of a device. The identifier must not change across application sessions but stay fixex for an instance of a (mobile) device.
On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android, this value must be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application.
For GDPR and data protection law reasons this identifier should not carry information that would allow to identify a user.
§Example
00000000-54b3-e7c7-0000-000046bffd97
Sourcepub fn get_model_name(&self) -> Option<&String>
pub fn get_model_name(&self) -> Option<&String>
The human readable marketing name of the device model.
Sourcepub fn set_model_name(&mut self, model_name_arg: String)
pub fn set_model_name(&mut self, model_name_arg: String)
Sourcepub fn get_model_identifier(&self) -> Option<&String>
pub fn get_model_identifier(&self) -> Option<&String>
The machine readable identifier of the device model.
Sourcepub fn set_model_identifier(&mut self, model_identifier_arg: String)
pub fn set_model_identifier(&mut self, model_identifier_arg: String)
Sourcepub fn get_manufacturer(&self) -> Option<&String>
pub fn get_manufacturer(&self) -> Option<&String>
The vendor name of the device manufacturer.