pub struct SpotifyLifecycle;Trait Implementations§
Source§impl CliLifecycle for SpotifyLifecycle
impl CliLifecycle for SpotifyLifecycle
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<(SpotifyServiceCfg, SpotifySecrets)>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn resolve<'life0, 'async_trait>(
args: &'life0 CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(SpotifyServiceCfg, SpotifySecrets)>> + 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 SpotifyLifecycle
impl LifecycleService for SpotifyLifecycle
Source§const NAME: &'static str = "spotify"
const NAME: &'static str = "spotify"
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 = "Spotify"
const DISPLAY: &'static str = "Spotify"
Capitalized display name for human-facing output (
"Discord").Source§type Cfg = SpotifyServiceCfg
type Cfg = SpotifyServiceCfg
Non-secret per-service config persisted to the service’s
config.toml. Anything that isn’t a credential belongs here.Source§type Secrets = SpotifySecrets
type Secrets = SpotifySecrets
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 SpotifyServiceCfg,
creds: &'life1 mut SpotifySecrets,
) -> 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 SpotifyServiceCfg,
creds: &'life1 mut SpotifySecrets,
) -> 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: &SpotifySecrets,
scope: Scope<'_>,
) -> Result<Vec<SecretRef>>
fn store_secrets( creds: &SpotifySecrets, 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<SpotifySecrets>>
fn load_secrets(scope: Scope<'_>) -> Result<Option<SpotifySecrets>>
Load the full secret material from the keychain at
scope.
Returns Ok(None) if any required account is missing.Source§fn cfg_human(cfg: &SpotifyServiceCfg) -> Vec<(&'static str, String)>
fn cfg_human(cfg: &SpotifyServiceCfg) -> Vec<(&'static str, String)>
Human-readable non-secret fields, as
(label, value) pairs.Source§fn cfg_json(cfg: &SpotifyServiceCfg) -> Value
fn cfg_json(cfg: &SpotifyServiceCfg) -> Value
Non-secret fields rendered for
--json.Source§fn scopes_of(cfg: &SpotifyServiceCfg) -> &[String]
fn scopes_of(cfg: &SpotifyServiceCfg) -> &[String]
Declared scopes — stored verbatim in the TOML config’s
scopes array.Source§fn post_create_hint(_cfg: &SpotifyServiceCfg) -> Option<String>
fn post_create_hint(_cfg: &SpotifyServiceCfg) -> Option<String>
Optional URL to surface immediately after
create succeeds.
Default: no hint.Auto Trait Implementations§
impl Freeze for SpotifyLifecycle
impl RefUnwindSafe for SpotifyLifecycle
impl Send for SpotifyLifecycle
impl Sync for SpotifyLifecycle
impl Unpin for SpotifyLifecycle
impl UnsafeUnpin for SpotifyLifecycle
impl UnwindSafe for SpotifyLifecycle
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