Skip to main content

TweetCommand

Struct TweetCommand 

Source
pub struct TweetCommand { /* private fields */ }
Expand description

Main tweets command handler.

Delegates to feature-specific modules for each operation while providing a unified entry point for the CLI.

Implementations§

Source§

impl TweetCommand

Source

pub fn new(ledger: IdempotencyLedger) -> Self

Create a new tweet command handler with a default stub API client

Source

pub fn with_client( ledger: IdempotencyLedger, client: Box<dyn TweetApiClient>, ) -> Self

Create a new tweet command handler with a custom API client

Source

pub fn create(&self, args: CreateArgs) -> Result<CreateResult>

Create a tweet with idempotency support

Source

pub fn like(&self, args: EngagementArgs) -> Result<EngagementResult>

Like a tweet

Source

pub fn unlike(&self, args: EngagementArgs) -> Result<EngagementResult>

Unlike a tweet

Source

pub fn retweet(&self, args: EngagementArgs) -> Result<EngagementResult>

Retweet a tweet

Source

pub fn unretweet(&self, args: EngagementArgs) -> Result<EngagementResult>

Unretweet a tweet

Source

pub fn list(&self, args: ListArgs) -> Result<ListResult>

List tweets with field projection and pagination

Source

pub fn reply(&self, args: ReplyArgs) -> Result<ReplyResult>

Reply to a tweet with idempotency support

Source

pub fn thread(&self, args: ThreadArgs) -> Result<ThreadResult>

Post a thread of tweets (sequential replies)

Source

pub fn show(&self, args: ShowArgs) -> Result<ShowResult>

Show a single tweet by ID

Source

pub fn conversation(&self, args: ConversationArgs) -> Result<ConversationResult>

Retrieve a conversation tree starting from a tweet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more