pub trait EnvScopeProvider: Send + Sync {
// Required method
fn resolve_env_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
name_or_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Resolves an environment name-or-id to the scope string used by the
underlying SecretsStore.
Typically backed by the API’s EnvironmentStorage plus the env_scope(..)
helper, which produces strings of the form env:{env_id} (global) or
project:{pid}:env:{env_id} (project-scoped).
This trait is consumed by SecretsResolver when resolving the
$secret://<env>/<KEY> URL-like reference form.
Required Methods§
Sourcefn resolve_env_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
name_or_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_env_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
name_or_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the scope string for the given env (name or id).
§Errors
Returns an error if the env does not exist or cannot be resolved.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".