pub struct ClientHints {
pub ua: String,
pub ua_mobile: String,
pub ua_platform: String,
pub ua_arch: Option<String>,
pub ua_bitness: Option<String>,
pub ua_model: Option<String>,
pub ua_full_version: Option<String>,
}Expand description
Client Hints for Sec-CH-UA-* headers
Fields§
§ua: StringSec-CH-UA: Brand and version list (e.g., "Chromium";v="131", "Google Chrome";v="131", "Not:A-Brand";v="24")
ua_mobile: StringSec-CH-UA-Mobile: ?1 or ?0
ua_platform: StringSec-CH-UA-Platform: Platform name
ua_arch: Option<String>Sec-CH-UA-Arch: CPU architecture (optional)
ua_bitness: Option<String>Sec-CH-UA-Bitness: CPU bitness (optional)
ua_model: Option<String>Sec-CH-UA-Model: Device model (optional, mostly for mobile)
ua_full_version: Option<String>Sec-CH-UA-Full-Version: Full browser version (optional, high-entropy)
Implementations§
Source§impl ClientHints
impl ClientHints
Sourcepub fn chrome_143_windows() -> Self
pub fn chrome_143_windows() -> Self
Create a new ClientHints for Chrome 143 on Windows
Sourcepub fn chrome_143_macos() -> Self
pub fn chrome_143_macos() -> Self
Create a new ClientHints for Chrome 143 on macOS
Sourcepub fn chrome_143_linux() -> Self
pub fn chrome_143_linux() -> Self
Create a new ClientHints for Chrome 143 on Linux
Sourcepub fn chrome_143_android() -> Self
pub fn chrome_143_android() -> Self
Create a new ClientHints for Chrome 143 on Android
Sourcepub fn chrome_120_windows() -> Self
pub fn chrome_120_windows() -> Self
Create a new ClientHints for Chrome 120 (legacy)
Sourcepub fn chrome_131_windows() -> Self
pub fn chrome_131_windows() -> Self
Create a new ClientHints for Chrome 131
Sourcepub fn chrome_133_windows() -> Self
pub fn chrome_133_windows() -> Self
Create a new ClientHints for Chrome 133
Sourcepub fn chrome_141_windows() -> Self
pub fn chrome_141_windows() -> Self
Create a new ClientHints for Chrome 141
Sourcepub fn to_headers(&self) -> OrderedHeaders
pub fn to_headers(&self) -> OrderedHeaders
Convert ClientHints to an ordered headers map
Trait Implementations§
Source§impl Clone for ClientHints
impl Clone for ClientHints
Source§fn clone(&self) -> ClientHints
fn clone(&self) -> ClientHints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more