pub struct FileProviderSource { /* private fields */ }Expand description
File-backed provider source rooted at a provider directory.
Implementations§
Source§impl FileProviderSource
impl FileProviderSource
Sourcepub fn resolve_python_provider_path(
&self,
provider_path: &Path,
) -> Result<PathBuf, FileProviderLoadError>
pub fn resolve_python_provider_path( &self, provider_path: &Path, ) -> Result<PathBuf, FileProviderLoadError>
Resolves an exact managed .py provider path under this source.
Source§impl FileProviderSource
impl FileProviderSource
Sourcepub fn with_python_environment_preparer(
self,
preparer: Arc<dyn PythonProviderEnvironmentPreparer>,
) -> Self
pub fn with_python_environment_preparer( self, preparer: Arc<dyn PythonProviderEnvironmentPreparer>, ) -> Self
Configures immutable Python environment preparation for .py
candidates. Existing sources remain ambient unless this is called.
Sourcepub fn with_python_runner(self, runner: PythonRunnerSelection) -> Self
pub fn with_python_runner(self, runner: PythonRunnerSelection) -> Self
Selects persistent execution for eligible Python providers.
Sourcepub fn inspect(
&self,
) -> Result<ProviderDirectoryInspection, FileProviderLoadError>
pub fn inspect( &self, ) -> Result<ProviderDirectoryInspection, FileProviderLoadError>
Non-executing inspection of the provider directory: parses manifests (JSON/TS/WASM sidecar/Python/Markdown) but never runs handler code, calls MCP, or fetches OpenAPI — safe to run before the runtime loads providers.
Sourcepub fn load(&self) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
pub fn load(&self) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
Loads and builds every enabled provider (including resource-file providers) from the directory, ready for registration.
Sourcepub fn load_with_python_environments(
&self,
selections: &PythonProviderEnvironmentSelections,
) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
pub fn load_with_python_environments( &self, selections: &PythonProviderEnvironmentSelections, ) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
Loads providers using the supplied immutable Python environment selections.
Sourcepub async fn load_with_python_environments_async(
&self,
selections: &PythonProviderEnvironmentSelections,
) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
pub async fn load_with_python_environments_async( &self, selections: &PythonProviderEnvironmentSelections, ) -> Result<Vec<Arc<dyn Provider>>, FileProviderLoadError>
Loads providers and preflights every persistent Python worker before returning a candidate set to the registry.
Sourcepub fn fingerprint(&self) -> Result<String, FileProviderLoadError>
pub fn fingerprint(&self) -> Result<String, FileProviderLoadError>
Computes a stable SHA-256 fingerprint over all provider inputs, used to detect changes to the provider directory.
Sourcepub fn fingerprint_with_python_environments(
&self,
selections: &PythonProviderEnvironmentSelections,
) -> Result<String, FileProviderLoadError>
pub fn fingerprint_with_python_environments( &self, selections: &PythonProviderEnvironmentSelections, ) -> Result<String, FileProviderLoadError>
Fingerprints provider inputs plus active Python environment generations.
Trait Implementations§
Source§impl Clone for FileProviderSource
impl Clone for FileProviderSource
Source§fn clone(&self) -> FileProviderSource
fn clone(&self) -> FileProviderSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FileProviderSource
impl !RefUnwindSafe for FileProviderSource
impl Send for FileProviderSource
impl Sync for FileProviderSource
impl Unpin for FileProviderSource
impl UnsafeUnpin for FileProviderSource
impl !UnwindSafe for FileProviderSource
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,
§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>
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 more