Skip to main content

Provider

Trait Provider 

Source
pub trait Provider:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

Base trait for all providers.

Every provider must implement this trait. Providers then implement one or more capability traits (SyncCapability, RuntimeCapability, SecretCapability) to define their functionality.

§Thread Safety

Providers must be Send + Sync to allow concurrent execution.

Required Methods§

Source

fn name(&self) -> &'static str

Unique name identifying this provider.

Used as the CLI subcommand name (e.g., “ci” for cuenv sync ci).

Source

fn description(&self) -> &'static str

Human-readable description for CLI help.

Source

fn as_any(&self) -> &dyn Any

Returns self as Any for capability detection.

This enables the registry to detect which capabilities a provider implements at runtime. The default implementation should work for most providers.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Returns self as mutable Any for capability detection.

Implementors§