pub trait Provider: Send + Sync {
// Required methods
fn catalog(&self) -> ProviderCatalog;
fn call<'life0, 'async_trait>(
&'life0 self,
call: ProviderCall,
) -> Pin<Box<dyn Future<Output = Result<ProviderOutput, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn retire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn suspend<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn runtime_status(&self) -> Option<Value> { ... }
fn cancel_active(&self) -> bool { ... }
fn reset_quarantine<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn deactivate(&self) { ... }
fn activate(&self) { ... }
fn acquire_dispatch(&self) -> bool { ... }
fn release_dispatch(&self) { ... }
}Required Methods§
fn catalog(&self) -> ProviderCatalog
fn call<'life0, 'async_trait>(
&'life0 self,
call: ProviderCall,
) -> Pin<Box<dyn Future<Output = Result<ProviderOutput, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn retire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop accepting new work and release provider-owned runtime resources.
Stateless providers use the default no-op. Registries call this after an atomic generation swap, outside registry locks.
Sourcefn suspend<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn suspend<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Parks runtime resources while keeping a retained generation callable.
Sourcefn runtime_status(&self) -> Option<Value>
fn runtime_status(&self) -> Option<Value>
Returns product-neutral operator status for a stateful runtime.
Sourcefn cancel_active(&self) -> bool
fn cancel_active(&self) -> bool
Cancels active runtime work without waiting for the provider call lock.
Sourcefn reset_quarantine<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset_quarantine<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears runtime quarantine after explicit operator authorization.
Sourcefn deactivate(&self)
fn deactivate(&self)
Stops new work on a retained generation while in-flight work drains.
Sourcefn acquire_dispatch(&self) -> bool
fn acquire_dispatch(&self) -> bool
Acquires a dispatch lease while the provider is still active.
Registries call this while holding their generation read lock so an already-routed invocation can drain safely across an atomic swap.
Sourcefn release_dispatch(&self)
fn release_dispatch(&self)
Releases a dispatch lease acquired by Provider::acquire_dispatch.