pub trait PostExecutor: Send + Sync {
// Required methods
fn execute_reply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
content: &'life2 str,
media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn execute_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for executing post actions against the X API.
This trait decouples the posting queue from the actual API client, allowing the queue to be tested with mock executors.
Required Methods§
Sourcefn execute_reply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
content: &'life2 str,
media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute_reply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
content: &'life2 str,
media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Post a reply to a specific tweet. Returns the posted tweet ID.
Sourcefn execute_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Post a new original tweet. Returns the posted tweet ID.