Struct PluginInstanceScope
pub struct PluginInstanceScope { /* private fields */ }Expand description
Shared identity and authority injected into every store for one instance.
Cloning this value shares the same immutable scope. It does not snapshot configuration, secrets, allowlists, limits, routes, or network policy.
Implementations§
Source§impl PluginInstanceScope
impl PluginInstanceScope
Sourcepub fn for_package_binding(
manifest: &PluginManifest,
capability: PluginCapability,
grants: impl IntoIterator<Item = PluginPermission>,
) -> Result<Self, PluginError>
pub fn for_package_binding( manifest: &PluginManifest, capability: PluginCapability, grants: impl IntoIterator<Item = PluginPermission>, ) -> Result<Self, PluginError>
Admit the package-name binding used by package-scoped runtime adapters.
This centralizes the default-binding convention without storing a
second copy of it. Alias-owned adapters should call Self::from_manifest
with their actual configured binding instead.
Sourcepub fn from_manifest(
manifest: &PluginManifest,
capability: PluginCapability,
binding: impl Into<String>,
grants: impl IntoIterator<Item = PluginPermission>,
) -> Result<Self, PluginError>
pub fn from_manifest( manifest: &PluginManifest, capability: PluginCapability, binding: impl Into<String>, grants: impl IntoIterator<Item = PluginPermission>, ) -> Result<Self, PluginError>
Admit a host-selected binding from a validated manifest and grant set.
The caller remains responsible for signature and publisher policy. This constructor enforces the structural authority invariants: the capability must be declared and every effective grant must have been requested.
§Errors
Returns an error for an invalid package slug, undeclared capability, or grant absent from the manifest’s requested permissions.
Sourcepub fn id(&self) -> &PluginInstanceId
pub fn id(&self) -> &PluginInstanceId
Canonical instance identity used to namespace host services.
Sourcepub fn grants(&self) -> &PluginGrantSet
pub fn grants(&self) -> &PluginGrantSet
Effective host permission grants for this instance.
Trait Implementations§
Source§impl Clone for PluginInstanceScope
impl Clone for PluginInstanceScope
Source§fn clone(&self) -> PluginInstanceScope
fn clone(&self) -> PluginInstanceScope
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more