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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginInstanceScope
impl RefUnwindSafe for PluginInstanceScope
impl Send for PluginInstanceScope
impl Sync for PluginInstanceScope
impl Unpin for PluginInstanceScope
impl UnsafeUnpin for PluginInstanceScope
impl UnwindSafe for PluginInstanceScope
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