pub enum DeviceProfile {
DesktopWindows,
DesktopMac,
DesktopLinux,
MobileAndroid,
MobileIOS,
}Expand description
Device profile type for consistent fingerprint generation.
Determines the OS, platform string, GPU pool, and font set used when
building a fingerprint via Fingerprint::from_device_profile.
§Example
use stygian_browser::fingerprint::DeviceProfile;
let profile = DeviceProfile::random_weighted(12345);
assert!(!profile.is_mobile());Variants§
DesktopWindows
Windows 10/11 desktop (≈70% of desktop market share).
DesktopMac
macOS desktop (≈20% of desktop market share).
DesktopLinux
Linux desktop (≈10% of desktop market share).
MobileAndroid
Android mobile device.
MobileIOS
iOS mobile device (iPhone/iPad).
Implementations§
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub const fn random_weighted(seed: u64) -> Self
pub const fn random_weighted(seed: u64) -> Self
Select a device profile weighted by real-world desktop market share.
Distribution: Windows 70%, macOS 20%, Linux 10%.
§Example
use stygian_browser::fingerprint::DeviceProfile;
// Most seeds produce DesktopWindows (70% weight).
let profile = DeviceProfile::random_weighted(0);
assert_eq!(profile, DeviceProfile::DesktopWindows);Trait Implementations§
Source§impl Clone for DeviceProfile
impl Clone for DeviceProfile
Source§fn clone(&self) -> DeviceProfile
fn clone(&self) -> DeviceProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceProfile
impl Debug for DeviceProfile
Source§impl Default for DeviceProfile
impl Default for DeviceProfile
Source§fn default() -> DeviceProfile
fn default() -> DeviceProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceProfile
impl<'de> Deserialize<'de> for DeviceProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 DeviceProfile
impl PartialEq for DeviceProfile
Source§impl Serialize for DeviceProfile
impl Serialize for DeviceProfile
impl Copy for DeviceProfile
impl Eq for DeviceProfile
impl StructuralPartialEq for DeviceProfile
Auto Trait Implementations§
impl Freeze for DeviceProfile
impl RefUnwindSafe for DeviceProfile
impl Send for DeviceProfile
impl Sync for DeviceProfile
impl Unpin for DeviceProfile
impl UnwindSafe for DeviceProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.