pub struct FingerprintRepository { /* private fields */ }Implementations§
Source§impl FingerprintRepository
impl FingerprintRepository
pub async fn upsert_fingerprint( &self, fingerprint_hash: &str, ip_address: Option<&str>, user_agent: Option<&str>, user_id: Option<&str>, ) -> Result<FingerprintReputation>
pub async fn flag_fingerprint( &self, fingerprint_hash: &str, reason: FlagReason, new_score: i32, ) -> Result<()>
pub async fn update_velocity_metrics( &self, fingerprint_hash: &str, requests_last_hour: i32, peak_requests_per_minute: f32, sustained_high_velocity_minutes: i32, ) -> Result<()>
pub async fn update_active_session_count( &self, fingerprint_hash: &str, active_count: i32, ) -> Result<()>
pub async fn increment_request_count( &self, fingerprint_hash: &str, ) -> Result<()>
pub async fn clear_flag(&self, fingerprint_hash: &str) -> Result<()>
pub async fn adjust_reputation_score( &self, fingerprint_hash: &str, delta: i32, ) -> Result<i32>
Source§impl FingerprintRepository
impl FingerprintRepository
pub async fn get_by_hash( &self, fingerprint_hash: &str, ) -> Result<Option<FingerprintReputation>>
pub async fn count_active_sessions(&self, fingerprint_hash: &str) -> Result<i32>
pub async fn find_reusable_session( &self, fingerprint_hash: &str, ) -> Result<Option<String>>
pub async fn get_fingerprints_for_analysis( &self, ) -> Result<Vec<FingerprintReputation>>
pub async fn get_high_risk_fingerprints( &self, limit: i64, ) -> Result<Vec<FingerprintReputation>>
Trait Implementations§
Source§impl Clone for FingerprintRepository
impl Clone for FingerprintRepository
Source§fn clone(&self) -> FingerprintRepository
fn clone(&self) -> FingerprintRepository
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 FingerprintRepository
impl Debug for FingerprintRepository
Source§impl FingerprintProvider for FingerprintRepository
impl FingerprintProvider for FingerprintRepository
fn count_active_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyticsResult<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_reusable_session<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyticsResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_fingerprint<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
ip_address: Option<&'life2 str>,
user_agent: Option<&'life3 str>,
_screen_info: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = AnalyticsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Auto Trait Implementations§
impl Freeze for FingerprintRepository
impl !RefUnwindSafe for FingerprintRepository
impl Send for FingerprintRepository
impl Sync for FingerprintRepository
impl Unpin for FingerprintRepository
impl !UnwindSafe for FingerprintRepository
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,
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