#[non_exhaustive]pub struct Fingerprint {
pub ip_prefix: String,
pub country: Option<String>,
pub asn: Option<u32>,
pub browser: Option<String>,
pub browser_major: Option<u32>,
pub os: Option<String>,
pub ch_platform: Option<String>,
pub ch_mobile: Option<bool>,
pub accept_language: Option<String>,
pub tls: Option<String>,
pub anonymity: Option<Anonymity>,
}Expand description
Normalised client signals. Stored server-side only, never sent to the client.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ip_prefix: StringThe client’s /24 (IPv4) or /48 (IPv6) network, e.g. 203.0.113.0/24.
country: Option<String>Country code from the IpIntel source.
asn: Option<u32>Autonomous system number from the IpIntel source.
browser: Option<String>Browser family parsed from the User-Agent.
browser_major: Option<u32>Browser major version.
os: Option<String>Operating system family parsed from the User-Agent.
ch_platform: Option<String>Platform family from Sec-CH-UA-Platform.
ch_mobile: Option<bool>Sec-CH-UA-Mobile.
accept_language: Option<String>Up to three lowercase language tags, comma separated.
tls: Option<String>TLS fingerprint (for example JA4) passed by the proxy.
anonymity: Option<Anonymity>Anonymizer the network belongs to, from the IpIntel source.
Implementations§
Source§impl Fingerprint
impl Fingerprint
Sourcepub fn capture(ctx: &ClientContext, info: &IpInfo) -> Self
pub fn capture(ctx: &ClientContext, info: &IpInfo) -> Self
Normalises a request context. info comes from the IpIntel source.
Trait Implementations§
Source§impl Clone for Fingerprint
impl Clone for Fingerprint
Source§impl Debug for Fingerprint
impl Debug for Fingerprint
Source§impl Default for Fingerprint
impl Default for Fingerprint
Source§impl<'de> Deserialize<'de> for Fingerprintwhere
Fingerprint: Default,
impl<'de> Deserialize<'de> for Fingerprintwhere
Fingerprint: Default,
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
impl Eq for Fingerprint
Source§impl PartialEq for Fingerprint
impl PartialEq for Fingerprint
Source§impl Serialize for Fingerprint
impl Serialize for Fingerprint
impl StructuralPartialEq for Fingerprint
Auto Trait Implementations§
impl Freeze for Fingerprint
impl RefUnwindSafe for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Unpin for Fingerprint
impl UnsafeUnpin for Fingerprint
impl UnwindSafe for Fingerprint
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more