pub struct Interface {
pub type: String,
pub name: String,
pub config: Value,
}Fields§
§type: StringAdapter type: telegram, discord, imessage, cli, webhook, …
name: StringFree-form name; used in logs and to route approvals.
config: ValueAdapter-specific config (bot token, channel id, allowlist, …).
Implementations§
Source§impl Interface
impl Interface
pub fn is_telegram(&self) -> bool
Sourcepub fn manager(&self) -> Option<String>
pub fn manager(&self) -> Option<String>
<project>:<manager> this interface routes to, when set.
Sourcepub fn bot_token_env(&self) -> Option<String>
pub fn bot_token_env(&self) -> Option<String>
Env var name holding the bot token (e.g. TEAMCTL_TG_PM_TOKEN).
Env var name holding a comma-separated allow-list of chat ids.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interface
impl<'de> Deserialize<'de> for Interface
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 Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnsafeUnpin for Interface
impl UnwindSafe for Interface
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