Skip to main content

ThreadPoster

Trait ThreadPoster 

Source
pub trait ThreadPoster: Send + Sync {
    // Required methods
    fn post_tweet<'life0, 'life1, 'async_trait>(
        &'life0 self,
        content: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, ContentLoopError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        in_reply_to: &'life1 str,
        content: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, ContentLoopError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Posts tweets directly to X (for thread reply chains).

Thread tweets bypass the posting queue because reply chain order must be maintained – each tweet must reply to the previous.

Required Methods§

Source

fn post_tweet<'life0, 'life1, 'async_trait>( &'life0 self, content: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, ContentLoopError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Post a standalone tweet. Returns the tweet ID.

Source

fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, in_reply_to: &'life1 str, content: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, ContentLoopError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reply to a tweet. Returns the new tweet ID.

Implementors§