pub struct NativeExtensionCustody { /* private fields */ }Expand description
Host ownership of one explicit DLL batch, including failed registration. Debug never reveals artifact paths, plugin state or Session data. Harness hooks must retain only a Weak reference; each actual worker takes a call scope, and shutdown drops the session before waiting on its receipts.
Implementations§
Source§impl NativeExtensionCustody
impl NativeExtensionCustody
pub fn new() -> Arc<Self> ⓘ
Sourcepub async fn load_owned(
self: &Arc<Self>,
files: Vec<PathBuf>,
diagnostics: Arc<dyn PluginDiagnostics>,
artifact_guard: Option<Arc<dyn Send + Sync>>,
) -> BackendResult<()>
pub async fn load_owned( self: &Arc<Self>, files: Vec<PathBuf>, diagnostics: Arc<dyn PluginDiagnostics>, artifact_guard: Option<Arc<dyn Send + Sync>>, ) -> BackendResult<()>
Invoke only from owned assembly, never readonly validation. The caller supplies trusted frozen/staged files and must validate capabilities before publishing hooks. No ActionBridge, scanner or ambient registry is used. Losing this waiter does not discard a partially loaded batch.
Sourcepub async fn load_owned_checked(
self: &Arc<Self>,
files: Vec<PathBuf>,
diagnostics: Arc<dyn PluginDiagnostics>,
artifact_guard: Option<Arc<dyn Send + Sync>>,
validate: impl FnMut(usize, &RegistrationInventory) -> bool + Send + 'static,
) -> BackendResult<()>
pub async fn load_owned_checked( self: &Arc<Self>, files: Vec<PathBuf>, diagnostics: Arc<dyn PluginDiagnostics>, artifact_guard: Option<Arc<dyn Send + Sync>>, validate: impl FnMut(usize, &RegistrationInventory) -> bool + Send + 'static, ) -> BackendResult<()>
Exact per-plugin data-only check, before SDK batch merge/publication. Rejection and validator panic retain the current and all preceding plugins in the same supervised cleanup path, never partial success.
Sourcepub fn call(self: &Arc<Self>) -> BackendResult<NativeExtensionCall>
pub fn call(self: &Arc<Self>) -> BackendResult<NativeExtensionCall>
This value MUST move into the actual callback worker. It holds a session keepalive until the callback and all plugin-owned frees have returned.