pub trait TargetStorage: Send + Sync {
// Required methods
fn upsert_target_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
username: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn target_tweet_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_target_tweet<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
account_id: &'life2 str,
content: &'life3 str,
created_at: &'life4 str,
reply_count: i64,
like_count: i64,
relevance_score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn mark_target_tweet_replied<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn record_target_reply<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn count_target_replies_today<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: '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<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Storage operations for target account state.
Required Methods§
Sourcefn upsert_target_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
username: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upsert_target_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
username: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Upsert a target account record.
Sourcefn target_tweet_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn target_tweet_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a target tweet already exists.
Sourcefn store_target_tweet<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
account_id: &'life2 str,
content: &'life3 str,
created_at: &'life4 str,
reply_count: i64,
like_count: i64,
relevance_score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn store_target_tweet<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
account_id: &'life2 str,
content: &'life3 str,
created_at: &'life4 str,
reply_count: i64,
like_count: i64,
relevance_score: f64,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Store a discovered target tweet.
Sourcefn mark_target_tweet_replied<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_target_tweet_replied<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark a target tweet as replied to.
Sourcefn record_target_reply<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_target_reply<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a reply to a target account (increments counter).
Sourcefn count_target_replies_today<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_target_replies_today<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get count of target replies sent today.
Sourcefn 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<(), LoopError>> + 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<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Log an action.