pub struct BindingsProvider { /* private fields */ }Expand description
Direct platform-specific bindings provider. Routes to appropriate platform implementations based on binding configuration.
Implementations§
Source§impl BindingsProvider
impl BindingsProvider
Sourcepub fn new(
client_config: ClientConfig,
bindings: HashMap<String, Value>,
) -> Result<Self>
pub fn new( client_config: ClientConfig, bindings: HashMap<String, Value>, ) -> Result<Self>
Creates a new BindingsProvider with explicit credentials and bindings.
This is the base constructor used by all other convenience constructors.
Sourcepub async fn from_env(env: HashMap<String, String>) -> Result<Self>
pub async fn from_env(env: HashMap<String, String>) -> Result<Self>
Creates a BindingsProvider from environment variables (for runtime use).
This parses the platform from ALIEN_DEPLOYMENT_TYPE, loads ClientConfig from environment, and extracts all ALIEN_*_BINDING environment variables.
Sourcepub fn from_stack_state(
stack_state: &StackState,
client_config: ClientConfig,
) -> Result<Self>
pub fn from_stack_state( stack_state: &StackState, client_config: ClientConfig, ) -> Result<Self>
Pattern 1: Creates a BindingsProvider from stack state and client config.
Convenience helper that extracts bindings from stack state’s remote_binding_params.
Only resources with remote_access: true will have binding params available.
When to use: You already have ClientConfig and StackState.
Example use cases:
- alien-deployment (has credentials from RemoteAccessResolver)
- Platform API backend (has stack state from DB)
Trait Implementations§
Source§impl BindingsProviderApi for BindingsProvider
impl BindingsProviderApi for BindingsProvider
Source§fn load_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_build<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_build<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_artifact_registry<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_artifact_registry<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_kv<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_kv<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_function<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Function>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_function<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Function>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_container<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_container<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_service_account<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_service_account<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Clone for BindingsProvider
impl Clone for BindingsProvider
Source§fn clone(&self) -> BindingsProvider
fn clone(&self) -> BindingsProvider
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BindingsProvider
impl RefUnwindSafe for BindingsProvider
impl Send for BindingsProvider
impl Sync for BindingsProvider
impl Unpin for BindingsProvider
impl UnsafeUnpin for BindingsProvider
impl UnwindSafe for BindingsProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request