pub struct PythonProvider { /* private fields */ }Implementations§
Source§impl PythonProvider
impl PythonProvider
Sourcepub async fn preflight(&self) -> Result<(), ProviderError>
pub async fn preflight(&self) -> Result<(), ProviderError>
Starts, negotiates, describes, and health-checks a persistent worker. One-shot providers have no persistent preflight and return immediately.
pub fn new( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, ) -> Self
pub fn new_with_interpreter( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, interpreter: PythonInterpreter, ) -> Self
Sourcepub fn new_persistent(
path: PathBuf,
catalog: ProviderCatalog,
env_prefix: impl Into<String>,
interpreter: PythonInterpreter,
config: PythonSupervisorConfig,
) -> Result<Self, ProviderError>
pub fn new_persistent( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, interpreter: PythonInterpreter, config: PythonSupervisorConfig, ) -> Result<Self, ProviderError>
Builds a provider backed by one lazily-started persistent worker.
pub fn arc_persistent( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, interpreter: PythonInterpreter, config: PythonSupervisorConfig, ) -> Result<Arc<Self>, ProviderError>
Sourcepub fn arc_persistent_in_generation(
path: PathBuf,
catalog: ProviderCatalog,
env_prefix: impl Into<String>,
interpreter: PythonInterpreter,
config: PythonSupervisorConfig,
immutable_generation_digest: String,
) -> Result<Arc<Self>, ProviderError>
pub fn arc_persistent_in_generation( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, interpreter: PythonInterpreter, config: PythonSupervisorConfig, immutable_generation_digest: String, ) -> Result<Arc<Self>, ProviderError>
Builds a persistent provider whose identity and worker budget are bound to the complete immutable source-tree generation.
pub fn arc( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, ) -> Arc<Self> ⓘ
pub fn arc_with_interpreter( path: PathBuf, catalog: ProviderCatalog, env_prefix: impl Into<String>, interpreter: PythonInterpreter, ) -> Arc<Self> ⓘ
Trait Implementations§
Source§impl Clone for PythonProvider
impl Clone for PythonProvider
Source§fn clone(&self) -> PythonProvider
fn clone(&self) -> PythonProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Provider for PythonProvider
impl Provider for PythonProvider
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,
Source§fn runtime_status(&self) -> Option<Value>
fn runtime_status(&self) -> Option<Value>
Returns product-neutral operator status for a stateful runtime.
Source§fn cancel_active(&self) -> bool
fn cancel_active(&self) -> bool
Cancels active runtime work without waiting for the provider call lock.
Source§fn 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.
Source§fn 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.
Source§fn deactivate(&self)
fn deactivate(&self)
Stops new work on a retained generation while in-flight work drains.
Source§fn acquire_dispatch(&self) -> bool
fn acquire_dispatch(&self) -> bool
Acquires a dispatch lease while the provider is still active. Read more
Source§fn release_dispatch(&self)
fn release_dispatch(&self)
Releases a dispatch lease acquired by [
Provider::acquire_dispatch].Auto Trait Implementations§
impl Freeze for PythonProvider
impl !RefUnwindSafe for PythonProvider
impl Send for PythonProvider
impl Sync for PythonProvider
impl Unpin for PythonProvider
impl UnsafeUnpin for PythonProvider
impl !UnwindSafe for PythonProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 more