pub struct TwitterConfig {
tlcheck_enabled: bool,
debug_exec_once: bool,
fake_tweet: bool,
consumer_key: String,
consumer_secret: String,
access_token: String,
access_secret: String,
ai_hashtag: String,
font_file: String,
tlcheck: TimelineCheck,
prompt: TwitterPrompt,
}Expand description
Twitter 設定データ。toml 設定に対応する。
Fields§
§tlcheck_enabled: boolタイムラインの定期確認を有効にする。
debug_exec_once: bool起動時に1回だけタイムライン確認タスクを起動する。デバッグ用。
fake_tweet: boolツイートを実際にはせずにログにのみ出力する。
consumer_key: StringTwitter API のアカウント情報。
consumer_secret: StringTwitter API のアカウント情報。
access_token: StringTwitter API のアカウント情報。
access_secret: StringTwitter API のアカウント情報。
ai_hashtag: StringOpenAI API 応答を起動するハッシュタグ。
font_file: String長文ツイートの画像化に使う ttf ファイルへのパス。 空文字列にすると機能を無効化する。
Debian 環境の例
sudo apt install fonts-ipafont
/usr/share/fonts/truetype/fonts-japanese-gothic.ttf
tlcheck: TimelineCheck§prompt: TwitterPromptOpenAI プロンプト。
Trait Implementations§
Source§impl Clone for TwitterConfig
impl Clone for TwitterConfig
Source§fn clone(&self) -> TwitterConfig
fn clone(&self) -> TwitterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TwitterConfig
impl Debug for TwitterConfig
Source§impl Default for TwitterConfig
impl Default for TwitterConfig
Source§impl<'de> Deserialize<'de> for TwitterConfig
impl<'de> Deserialize<'de> for TwitterConfig
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 TwitterConfig
impl RefUnwindSafe for TwitterConfig
impl Send for TwitterConfig
impl Sync for TwitterConfig
impl Unpin for TwitterConfig
impl UnwindSafe for TwitterConfig
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
§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().