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
Source§impl JsonSchema for Interface
impl JsonSchema for Interface
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto 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