pub struct LocalModeXClient { /* private fields */ }Expand description
X API client for local/scraper mode — no OAuth credentials required.
When a valid scraper_session.json exists in the data directory,
write operations are dispatched to the cookie-based transport.
Otherwise, they return ScraperTransportUnavailable.
Implementations§
Source§impl LocalModeXClient
impl LocalModeXClient
Sourcepub fn new(allow_mutations: bool) -> Self
pub fn new(allow_mutations: bool) -> Self
Create a new local-mode client.
allow_mutations controls whether write operations are attempted
(when true) or immediately rejected (when false).
Sourcepub async fn with_session(allow_mutations: bool, data_dir: &Path) -> Self
pub async fn with_session(allow_mutations: bool, data_dir: &Path) -> Self
Create a local-mode client with cookie-auth from a session file.
If the session file exists and is valid, write operations will use the cookie transport. Otherwise, falls back to stub behavior.
Auto-detects the current CreateTweet GraphQL query ID from X’s web client JS bundles at startup.
Sourcepub fn session_path(data_dir: &Path) -> PathBuf
pub fn session_path(data_dir: &Path) -> PathBuf
Path to the session file in a given data directory.
Trait Implementations§
Source§impl XApiClient for LocalModeXClient
impl XApiClient for LocalModeXClient
Source§fn get_me<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_me<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the authenticated user’s profile.
Source§fn get_mentions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_since_id: Option<&'life2 str>,
_pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<MentionResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_mentions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_since_id: Option<&'life2 str>,
_pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<MentionResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get mentions for the authenticated user. Read more
Source§fn get_home_timeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_home_timeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the authenticated user’s home timeline (reverse chronological).
Source§fn get_bookmarks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_bookmarks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the authenticated user’s bookmarks.
Source§fn bookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Bookmark a tweet.
Source§fn unbookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unbookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a bookmark.
Source§fn search_tweets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_query: &'life1 str,
_max_results: u32,
_since_id: Option<&'life2 str>,
_pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search_tweets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_query: &'life1 str,
_max_results: u32,
_since_id: Option<&'life2 str>,
_pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Search recent tweets matching the given query. Read more
Source§fn get_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Tweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Tweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a single tweet by ID.
Source§fn get_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a user by their username.
Source§fn get_user_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_user_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get recent tweets from a specific user.
Source§fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a user by their ID.
Source§fn get_followers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_followers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get followers of a user.
Source§fn get_following<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_following<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get accounts a user is following.
Source§fn get_users_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_users_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get multiple users by their IDs.
Source§fn get_liked_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_liked_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get tweets liked by a user.
Source§fn get_tweet_liking_users<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_tweet_liking_users<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
_max_results: u32,
_pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get users who liked a specific tweet.
Source§fn raw_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_url: &'life2 str,
_query: Option<&'life3 [(String, String)]>,
_body: Option<&'life4 str>,
_headers: Option<&'life5 [(String, String)]>,
) -> Pin<Box<dyn Future<Output = Result<RawApiResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn raw_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_url: &'life2 str,
_query: Option<&'life3 [(String, String)]>,
_body: Option<&'life4 str>,
_headers: Option<&'life5 [(String, String)]>,
) -> Pin<Box<dyn Future<Output = Result<RawApiResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Execute a raw HTTP request against the X API. Read more
Source§fn post_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Post a new tweet.
Source§fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reply to an existing tweet.
Source§fn post_tweet_with_media<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
_media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn post_tweet_with_media<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
_media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Post a new tweet with media attachments. Read more
Source§fn reply_to_tweet_with_media<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
_media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn reply_to_tweet_with_media<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
_media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reply to an existing tweet with media attachments. Read more
Source§fn quote_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_text: &'life1 str,
_quoted_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn quote_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_text: &'life1 str,
_quoted_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Post a quote tweet referencing another tweet.
Source§fn like_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn like_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Like a tweet on behalf of the authenticated user.
Source§fn unlike_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unlike_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unlike a tweet on behalf of the authenticated user.
Source§fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Follow a user on behalf of the authenticated user.
Source§fn unfollow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unfollow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unfollow a user on behalf of the authenticated user.
Source§fn retweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retweet a tweet on behalf of the authenticated user.
Source§fn unretweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unretweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Undo a retweet on behalf of the authenticated user.
Source§fn delete_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
_tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a tweet by its ID.
Source§fn upload_media<'life0, 'life1, 'async_trait>(
&'life0 self,
_data: &'life1 [u8],
_media_type: MediaType,
) -> Pin<Box<dyn Future<Output = Result<MediaId, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_media<'life0, 'life1, 'async_trait>(
&'life0 self,
_data: &'life1 [u8],
_media_type: MediaType,
) -> Pin<Box<dyn Future<Output = Result<MediaId, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Upload media to X API for attaching to tweets. Read more
Auto Trait Implementations§
impl Freeze for LocalModeXClient
impl !RefUnwindSafe for LocalModeXClient
impl Send for LocalModeXClient
impl Sync for LocalModeXClient
impl Unpin for LocalModeXClient
impl UnsafeUnpin for LocalModeXClient
impl !UnwindSafe for LocalModeXClient
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