pub enum PostAction {
Reply {
tweet_id: String,
content: String,
media_ids: Vec<String>,
result_tx: Option<Sender<Result<String, String>>>,
},
Tweet {
content: String,
media_ids: Vec<String>,
result_tx: Option<Sender<Result<String, String>>>,
},
ThreadTweet {
content: String,
in_reply_to: String,
media_ids: Vec<String>,
result_tx: Option<Sender<Result<String, String>>>,
},
}Expand description
An action to be executed by the posting queue consumer.
Each variant optionally includes a oneshot sender so the caller can await the result (e.g., the posted tweet ID or an error message).
Variants§
Reply
Reply to an existing tweet.
Fields
Tweet
Post a new original tweet.
Fields
ThreadTweet
Post a tweet as part of a thread (reply to previous tweet in thread).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PostAction
impl !RefUnwindSafe for PostAction
impl Send for PostAction
impl Sync for PostAction
impl Unpin for PostAction
impl UnsafeUnpin for PostAction
impl !UnwindSafe for PostAction
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