pub struct AnalyticsStorageAdapter { /* private fields */ }Expand description
Adapts DbPool to the AnalyticsStorage port trait.
Implementations§
Trait Implementations§
Source§impl AnalyticsStorage for AnalyticsStorageAdapter
impl AnalyticsStorage for AnalyticsStorageAdapter
Source§fn store_follower_snapshot<'life0, 'async_trait>(
&'life0 self,
followers: i64,
following: i64,
tweets: i64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_follower_snapshot<'life0, 'async_trait>(
&'life0 self,
followers: i64,
following: i64,
tweets: i64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a daily follower snapshot.
Source§fn get_yesterday_followers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_yesterday_followers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get yesterday’s follower count (for drop detection).
Source§fn get_replies_needing_measurement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_replies_needing_measurement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get reply IDs posted approximately 24h ago that need performance measurement.
Source§fn get_tweets_needing_measurement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tweets_needing_measurement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get tweet IDs posted approximately 24h ago that need performance measurement.
Source§fn store_reply_performance<'life0, 'life1, 'async_trait>(
&'life0 self,
reply_id: &'life1 str,
likes: i64,
replies: i64,
impressions: i64,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_reply_performance<'life0, 'life1, 'async_trait>(
&'life0 self,
reply_id: &'life1 str,
likes: i64,
replies: i64,
impressions: i64,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store reply performance metrics.
Source§fn store_tweet_performance<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
likes: i64,
retweets: i64,
replies: i64,
impressions: i64,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_tweet_performance<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
likes: i64,
retweets: i64,
replies: i64,
impressions: i64,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store tweet performance metrics.
Source§fn update_content_score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
format: &'life2 str,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_content_score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
format: &'life2 str,
score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update the content score running average for a topic.
Source§fn log_action<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
action_type: &'life1 str,
status: &'life2 str,
message: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn log_action<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
action_type: &'life1 str,
status: &'life2 str,
message: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Log an action.
Source§fn run_aggregations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_aggregations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run background aggregation jobs (best-times heatmap, reach snapshots). Read more
Source§fn run_forge_sync_if_enabled<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ForgeSyncResult>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_forge_sync_if_enabled<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ForgeSyncResult>, AnalyticsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run Forge sync if the active content source has analytics sync enabled. Read more
Auto Trait Implementations§
impl Freeze for AnalyticsStorageAdapter
impl !RefUnwindSafe for AnalyticsStorageAdapter
impl Send for AnalyticsStorageAdapter
impl Sync for AnalyticsStorageAdapter
impl Unpin for AnalyticsStorageAdapter
impl UnsafeUnpin for AnalyticsStorageAdapter
impl !UnwindSafe for AnalyticsStorageAdapter
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> 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