pub struct XConfig {Show 14 fields
pub enabled: bool,
pub bearer_token: String,
pub api_key: String,
pub api_secret: String,
pub access_token: String,
pub access_token_secret: String,
pub bot_user_id: String,
pub allowlist: Vec<String>,
pub respond_to_mentions: bool,
pub respond_to_dms: bool,
pub max_tweet_length: usize,
pub mention_poll_interval_secs: u64,
pub dm_poll_interval_secs: u64,
pub rate_limit_per_minute: u32,
}Expand description
X (Twitter) API v2 configuration.
Fields§
§enabled: bool§bearer_token: StringBearer token for X API v2
api_key: StringAPI key (for user context endpoints)
api_secret: StringAPI secret (for user context endpoints)
access_token: StringAccess token (for user context endpoints)
access_token_secret: StringAccess token secret (for user context endpoints)
bot_user_id: StringBot user ID (numeric string)
allowlist: Vec<String>List of allowed usernames (without @, empty = all allowed)
respond_to_mentions: boolRespond to mentions
respond_to_dms: boolRespond to DMs
max_tweet_length: usizeMaximum tweet length (default: 280)
mention_poll_interval_secs: u64Polling interval for mentions in seconds
dm_poll_interval_secs: u64Polling interval for DMs in seconds
rate_limit_per_minute: u32Rate limit for sending tweets per minute
Trait Implementations§
Source§impl<'de> Deserialize<'de> for XConfig
impl<'de> Deserialize<'de> for XConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for XConfig
impl RefUnwindSafe for XConfig
impl Send for XConfig
impl Sync for XConfig
impl Unpin for XConfig
impl UnsafeUnpin for XConfig
impl UnwindSafe for XConfig
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