[][src]Struct openrtb2::Device

pub struct Device<'a> {
    pub ua: Option<Cow<'a, str>>,
    pub geo: Option<Geo<'a>>,
    pub dnt: Option<bool>,
    pub lmt: Option<bool>,
    pub ip: Option<Cow<'a, str>>,
    pub ipv6: Option<Cow<'a, str>>,
    pub devicetype: Option<DeviceType>,
    pub make: Option<Cow<'a, str>>,
    pub model: Option<Cow<'a, str>>,
    pub os: Option<Cow<'a, str>>,
    pub osv: Option<Cow<'a, str>>,
    pub hwv: Option<Cow<'a, str>>,
    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<Cow<'a, str>>,
    pub language: Option<Cow<'a, str>>,
    pub carrier: Option<Cow<'a, str>>,
    pub mccmnc: Option<Cow<'a, str>>,
    pub connectiontype: Option<ConnectionType>,
    pub ifa: Option<Cow<'a, str>>,
    pub didsha1: Option<Cow<'a, str>>,
    pub didmd5: Option<Cow<'a, str>>,
    pub dpidsha1: Option<Cow<'a, str>>,
    pub dpidmd5: Option<Cow<'a, str>>,
    pub macsha1: Option<Cow<'a, str>>,
    pub macmd5: Option<Cow<'a, str>>,
    pub ext: Option<Object<'a>>,
}

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<Cow<'a, str>>

string; recommended Browser user agent string.

geo: Option<Geo<'a>>

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<Cow<'a, str>>

string; recommended IPv4 address closest to device.

ipv6: Option<Cow<'a, str>>

string IP address closest to device as IPv6.

devicetype: Option<DeviceType>

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

make: Option<Cow<'a, str>>

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

model: Option<Cow<'a, str>>

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

os: Option<Cow<'a, str>>

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

osv: Option<Cow<'a, str>>

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

hwv: Option<Cow<'a, str>>

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<Cow<'a, str>>

string Version of Flash supported by the browser.

language: Option<Cow<'a, str>>

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

carrier: Option<Cow<'a, str>>

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

mccmnc: Option<Cow<'a, str>>

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<Cow<'a, str>>

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

didsha1: Option<Cow<'a, str>>

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

didmd5: Option<Cow<'a, str>>

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

dpidsha1: Option<Cow<'a, str>>

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

dpidmd5: Option<Cow<'a, str>>

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

macsha1: Option<Cow<'a, str>>

string MAC address of the device; hashed via SHA1.

macmd5: Option<Cow<'a, str>>

string MAC address of the device; hashed via MD5.

ext: Option<Object<'a>>

object Placeholder for exchange-specific extensions to OpenRTB.

Trait Implementations

impl<'a> Clone for Device<'a>[src]

impl<'a> Debug for Device<'a>[src]

impl<'a> Default for Device<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Device<'a>[src]

impl<'a> PartialEq<Device<'a>> for Device<'a>[src]

impl<'a> Serialize for Device<'a>[src]

impl<'a> StructuralPartialEq for Device<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Device<'a>

impl<'a> Send for Device<'a>

impl<'a> Sync for Device<'a>

impl<'a> Unpin for Device<'a>

impl<'a> UnwindSafe for Device<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.