Struct Device

Source
pub struct Device {
Show 31 fields pub ua: Option<String>, pub geo: Option<Geo>, pub dnt: Option<bool>, pub lmt: Option<bool>, pub ip: Option<String>, pub ipv6: Option<String>, pub devicetype: Option<DeviceType>, pub make: Option<String>, pub model: Option<String>, pub os: Option<String>, pub osv: Option<String>, pub hwv: Option<String>, pub h: Option<i32>, pub w: Option<i32>, pub ppi: Option<i32>, pub pxratio: Option<i32>, pub js: Option<bool>, pub geofetch: Option<bool>, pub flashver: Option<String>, pub language: Option<String>, pub carrier: Option<String>, pub mccmnc: Option<String>, pub connectiontype: Option<ConnectionType>, pub ifa: Option<String>, pub didsha1: Option<String>, pub didmd5: Option<String>, pub dpidsha1: Option<String>, pub dpidmd5: Option<String>, pub macsha1: Option<String>, pub macmd5: Option<String>, pub ext: Option<Map<String, Value>>,
}
Expand description

3.2.18 Object: Device

This object provides information pertaining to the device through which the user is interacting. Device information includes its hardware, platform, location, and carrier data. The device can refer to a mobile handset, a desktop computer, set top box, or other digital device.

Fields§

§ua: Option<String>

string; recommended Browser user agent string.

§geo: Option<Geo>

object; recommended Location of the device assumed to be the user’s current location defined by a Geo object (Section 3.2.19).

§dnt: Option<bool>

integer; recommended Standard “Do Not Track” flag as set in the header by the browser, where 0 = tracking is unrestricted, 1 = do not track.

§lmt: Option<bool>

integer; recommended “Limit Ad Tracking” signal commercially endorsed (e.g., iOS, Android), where 0 = tracking is unrestricted, 1 = tracking must be limited per commercial guidelines.

§ip: Option<String>

string; recommended IPv4 address closest to device.

§ipv6: Option<String>

string IP address closest to device as IPv6.

§devicetype: Option<DeviceType>

integer The general type of device. Refer to List 5.21.

§make: Option<String>

string Device make (e.g., “Apple”).

§model: Option<String>

string Device model (e.g., “iPhone”).

§os: Option<String>

string Device operating system (e.g., “iOS”).

§osv: Option<String>

string Device operating system version (e.g., “3.1.2”).

§hwv: Option<String>

string Hardware version of the device (e.g., “5S” for iPhone 5S).

§h: Option<i32>

integer Physical height of the screen in pixels.

§w: Option<i32>

integer Physical width of the screen in pixels.

§ppi: Option<i32>

integer Screen size as pixels per linear inch.

§pxratio: Option<i32>

float The ratio of physical pixels to device independent pixels.

§js: Option<bool>

integer Support for JavaScript, where 0 = no, 1 = yes.

§geofetch: Option<bool>

integer Indicates if the geolocation API will be available to JavaScript code running in the banner, where 0 = no, 1 = yes.

§flashver: Option<String>

string Version of Flash supported by the browser.

§language: Option<String>

string Browser language using ISO-639-1-alpha-2.

§carrier: Option<String>

string Carrier or ISP (e.g., “VERIZON”) using exchange curated string names which should be published to bidders a priori.

§mccmnc: Option<String>

string Mobile carrier as the concatenated MCC-MNC code (e.g., “310-005” identifies Verizon Wireless CDMA in the USA). Refer to https://en.wikipedia.org/wiki/Mobile_country_code for further examples. Note that the dash between the MCC and MNC parts is required to remove parsing ambiguity.

§connectiontype: Option<ConnectionType>

integer Network connection type. Refer to List 5.22.

§ifa: Option<String>

string ID sanctioned for advertiser use in the clear (i.e., not hashed).

§didsha1: Option<String>

string Hardware device ID (e.g., IMEI); hashed via SHA1.

§didmd5: Option<String>

string Hardware device ID (e.g., IMEI); hashed via MD5.

§dpidsha1: Option<String>

string Platform device ID (e.g., Android ID); hashed via SHA1.

§dpidmd5: Option<String>

string Platform device ID (e.g., Android ID); hashed via MD5.

§macsha1: Option<String>

string MAC address of the device; hashed via SHA1.

§macmd5: Option<String>

string MAC address of the device; hashed via MD5.

§ext: Option<Map<String, Value>>

object Placeholder for exchange-specific extensions to OpenRTB.

Trait Implementations§

Source§

impl Clone for Device

Source§

fn clone(&self) -> Device

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Device

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Device

Source§

fn default() -> Device

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Device

Source§

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 PartialEq for Device

Source§

fn eq(&self, other: &Device) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Device

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Device

Auto Trait Implementations§

§

impl Freeze for Device

§

impl RefUnwindSafe for Device

§

impl Send for Device

§

impl Sync for Device

§

impl Unpin for Device

§

impl UnwindSafe for Device

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DefaultExt for T
where T: Default + PartialEq,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,