pub struct TargetStorageAdapter { /* private fields */ }Expand description
Adapts DbPool to the TargetStorage port trait.
Implementations§
Trait Implementations§
Source§impl TargetStorage for TargetStorageAdapter
impl TargetStorage for TargetStorageAdapter
Source§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 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.
Source§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 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.
Source§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 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.
Source§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 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.
Source§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 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).
Source§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 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.
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<(), 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.
Auto Trait Implementations§
impl Freeze for TargetStorageAdapter
impl !RefUnwindSafe for TargetStorageAdapter
impl Send for TargetStorageAdapter
impl Sync for TargetStorageAdapter
impl Unpin for TargetStorageAdapter
impl UnsafeUnpin for TargetStorageAdapter
impl !UnwindSafe for TargetStorageAdapter
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