pub struct TelegramLifecycle;Trait Implementations§
Source§impl CliLifecycle for TelegramLifecycle
impl CliLifecycle for TelegramLifecycle
Source§type CreateArgs = CreateArgs
type CreateArgs = CreateArgs
Per-service
zad service create <name> flag struct. Must
embed CreateArgsBase via #[command(flatten)] and expose
it through CreateArgsLike::base.Source§fn resolve<'life0, 'async_trait>(
args: &'life0 CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(TelegramServiceCfg, TelegramSecrets)>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn resolve<'life0, 'async_trait>(
args: &'life0 CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(TelegramServiceCfg, TelegramSecrets)>> + Send + 'async_trait>>where
'life0: 'async_trait,
Build
(Cfg, Secrets) from CLI args. Interactive mode prompts
for any Option<_> fields that arrived empty; non-interactive
mode returns ZadError::MissingRequired for anything still
missing.Source§impl LifecycleService for TelegramLifecycle
impl LifecycleService for TelegramLifecycle
Source§const NAME: &'static str = "telegram"
const NAME: &'static str = "telegram"
Lowercase identifier used in paths, commands, and keychain
account names (
"discord", "telegram", …). Must match the
entry in crate::service::registry::SERVICES.Source§const DISPLAY: &'static str = "Telegram"
const DISPLAY: &'static str = "Telegram"
Capitalized display name for human-facing output (
"Discord").Source§type Cfg = TelegramServiceCfg
type Cfg = TelegramServiceCfg
Non-secret per-service config persisted to the service’s
config.toml. Anything that isn’t a credential belongs here.Source§type Secrets = TelegramSecrets
type Secrets = TelegramSecrets
Credential material held in the OS keychain. Shape is up to
the service: one bot token, three OAuth fields, a PEM blob —
whatever the provider needs.
Source§fn enable_in_project(cfg: &mut ProjectConfig)
fn enable_in_project(cfg: &mut ProjectConfig)
Mark the current project as using this service.
Source§fn disable_in_project(cfg: &mut ProjectConfig)
fn disable_in_project(cfg: &mut ProjectConfig)
Remove this service’s entry from the current project config.
Source§fn validate<'life0, 'life1, 'async_trait>(
_cfg: &'life0 TelegramServiceCfg,
creds: &'life1 mut TelegramSecrets,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
_cfg: &'life0 TelegramServiceCfg,
creds: &'life1 mut TelegramSecrets,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Confirm the credentials work by pinging the provider. Returns
a short identifier (bot username, GitHub App slug) on success. Read more
Source§fn store_secrets(
creds: &TelegramSecrets,
scope: Scope<'_>,
) -> Result<Vec<SecretRef>>
fn store_secrets( creds: &TelegramSecrets, scope: Scope<'_>, ) -> Result<Vec<SecretRef>>
Write each piece of secret material to the OS keychain at
scope. Returns one SecretRef per account written.Source§fn delete_secrets(scope: Scope<'_>) -> Result<Vec<SecretRef>>
fn delete_secrets(scope: Scope<'_>) -> Result<Vec<SecretRef>>
Remove every keychain entry for this service at
scope.
Idempotent.Source§fn inspect_secrets(scope: Scope<'_>) -> Result<Vec<SecretRef>>
fn inspect_secrets(scope: Scope<'_>) -> Result<Vec<SecretRef>>
Report keychain presence per account this service expects.
Source§fn load_secrets(scope: Scope<'_>) -> Result<Option<TelegramSecrets>>
fn load_secrets(scope: Scope<'_>) -> Result<Option<TelegramSecrets>>
Load the full secret material from the keychain at
scope.
Returns Ok(None) if any required account is missing.Source§fn cfg_human(cfg: &TelegramServiceCfg) -> Vec<(&'static str, String)>
fn cfg_human(cfg: &TelegramServiceCfg) -> Vec<(&'static str, String)>
Human-readable non-secret fields, as
(label, value) pairs.Source§fn cfg_json(cfg: &TelegramServiceCfg) -> Value
fn cfg_json(cfg: &TelegramServiceCfg) -> Value
Non-secret fields rendered for
--json.Source§fn scopes_of(cfg: &TelegramServiceCfg) -> &[String]
fn scopes_of(cfg: &TelegramServiceCfg) -> &[String]
Declared scopes — stored verbatim in the TOML config’s
scopes array.Auto Trait Implementations§
impl Freeze for TelegramLifecycle
impl RefUnwindSafe for TelegramLifecycle
impl Send for TelegramLifecycle
impl Sync for TelegramLifecycle
impl Unpin for TelegramLifecycle
impl UnsafeUnpin for TelegramLifecycle
impl UnwindSafe for TelegramLifecycle
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