pub struct BaleConfig {
pub enabled: bool,
pub bot_token: String,
pub chat_id: String,
}Fields§
§enabled: bool§bot_token: String§chat_id: StringImplementations§
Source§impl BaleConfig
impl BaleConfig
Sourcepub fn resolved_token(&self) -> String
pub fn resolved_token(&self) -> String
Resolve bot token from BALE_BOT_TOKEN env var if set, falling back to config.yaml.
Trait Implementations§
Source§impl Clone for BaleConfig
impl Clone for BaleConfig
Source§impl Debug for BaleConfig
impl Debug for BaleConfig
Source§impl<'de> Deserialize<'de> for BaleConfig
impl<'de> Deserialize<'de> for BaleConfig
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 Forget for BaleConfig
impl Freeze for BaleConfig
impl Move for BaleConfig
impl RefUnwindSafe for BaleConfig
impl Send for BaleConfigwhere
RawVecInner: Send,
impl Sync for BaleConfigwhere
RawVecInner: Sync,
impl Unpin for BaleConfig
impl UnsafeUnpin for BaleConfig
impl UnwindSafe for BaleConfigwhere
RawVecInner: UnwindSafe,
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