Struct fastly::device_detection::Device
source · pub struct Device { /* private fields */ }
Expand description
The device data associated with a particular User-Agent string.
Implementations§
source§impl Device
impl Device
sourcepub fn device_name(&self) -> Option<&str>
pub fn device_name(&self) -> Option<&str>
The name of the client device.
sourcepub fn brand(&self) -> Option<&str>
pub fn brand(&self) -> Option<&str>
The brand of the client device, possibly different from the manufacturer of that device.
sourcepub fn hwtype(&self) -> Option<&str>
pub fn hwtype(&self) -> Option<&str>
A string representation of the primary client platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.
sourcepub fn is_ereader(&self) -> Option<bool>
pub fn is_ereader(&self) -> Option<bool>
The client device is a reading device (like a Kindle).
sourcepub fn is_gameconsole(&self) -> Option<bool>
pub fn is_gameconsole(&self) -> Option<bool>
The client device is a video game console (like a PlayStation or Xbox).
sourcepub fn is_mediaplayer(&self) -> Option<bool>
pub fn is_mediaplayer(&self) -> Option<bool>
The client device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo).
sourcepub fn is_smarttv(&self) -> Option<bool>
pub fn is_smarttv(&self) -> Option<bool>
The client device is a smart TV.
sourcepub fn is_tvplayer(&self) -> Option<bool>
pub fn is_tvplayer(&self) -> Option<bool>
The client device is a set-top box or other TV player (like a Roku or Apple TV).
sourcepub fn is_desktop(&self) -> Option<bool>
pub fn is_desktop(&self) -> Option<bool>
The client is a desktop web browser.
sourcepub fn is_touchscreen(&self) -> Option<bool>
pub fn is_touchscreen(&self) -> Option<bool>
The client device’s screen is touch sensitive.