pub enum VendorId {
Akamai,
Cloudflare,
DataDome,
PerimeterX,
Hcaptcha,
Recaptcha,
Kasada,
FingerprintCom,
ShapeSecurity,
Imperva,
Unknown,
}Expand description
Stable identifier for an anti-bot vendor.
The discriminant order is significant: it is the
deterministic tie-break rule for the classifier. When two
vendors tie on the top score, the lower discriminant
(Akamai < Cloudflare < DataDome < PerimeterX < …)
wins.
§Example
use stygian_charon::vendor_classifier::VendorId;
let v = VendorId::DataDome;
assert_eq!(v.label(), "datadome");
assert_eq!(v.tier(), 1);Variants§
Akamai
Akamai Bot Manager (_abck, bm_sz).
Cloudflare
Cloudflare bot management (cf-ray, __cf_bm).
DataDome
DataDome (datadome=, x-datadome).
PerimeterX
PerimeterX / HUMAN Security (_px3, _px2).
Hcaptcha
hCaptcha challenge provider.
Recaptcha
Google reCAPTCHA challenge provider.
Kasada
Kasada challenge provider.
FingerprintCom
Fingerprint.com identification.
ShapeSecurity
Shape Security (F5).
Imperva
Imperva (Incapsula) bot management.
Unknown
Catch-all when no vendor matched.
Implementations§
Source§impl VendorId
impl VendorId
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
Stable, lower-case wire label.
§Example
use stygian_charon::vendor_classifier::VendorId;
assert_eq!(VendorId::DataDome.label(), "datadome");
assert_eq!(VendorId::PerimeterX.label(), "perimeter_x");
assert_eq!(VendorId::Cloudflare.label(), "cloudflare");
assert_eq!(VendorId::Akamai.label(), "akamai");Sourcepub const fn tier(self) -> u8
pub const fn tier(self) -> u8
Tier number (1 = always shipped, 2 = taxonomy-only, 0 = unknown).
§Example
use stygian_charon::vendor_classifier::VendorId;
assert_eq!(VendorId::DataDome.tier(), 1);
assert_eq!(VendorId::Cloudflare.tier(), 1);
assert_eq!(VendorId::Akamai.tier(), 1);
assert_eq!(VendorId::PerimeterX.tier(), 1);
assert_eq!(VendorId::Unknown.tier(), 0);Sourcepub fn from_label(label: &str) -> Option<Self>
pub fn from_label(label: &str) -> Option<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VendorId
impl<'de> Deserialize<'de> for VendorId
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 Ord for VendorId
impl Ord for VendorId
Source§impl PartialOrd for VendorId
impl PartialOrd for VendorId
impl Copy for VendorId
impl Eq for VendorId
impl StructuralPartialEq for VendorId
Auto Trait Implementations§
impl Freeze for VendorId
impl RefUnwindSafe for VendorId
impl Send for VendorId
impl Sync for VendorId
impl Unpin for VendorId
impl UnsafeUnpin for VendorId
impl UnwindSafe for VendorId
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.