pub struct DeclaredPluginStore { /* private fields */ }Expand description
In-memory store for declared plugins.
The store is the source of truth for dependency analysis and
listing; persistence rides through Persistence and replays
the same records through this store on construction.
Implementations§
Source§impl DeclaredPluginStore
impl DeclaredPluginStore
Sourcepub fn declare(&self, plugin: DeclaredPlugin) -> Result<(), CustomError>
pub fn declare(&self, plugin: DeclaredPlugin) -> Result<(), CustomError>
Declare a new plugin or replace an existing declaration with dependency + cycle validation.
§Errors
Returns CustomError::DependencyMissing if any declared
dependency is not present in the store. Returns
CustomError::DependencyCycle if adding this plugin would
introduce a cycle.
Sourcepub fn declare_unchecked(&self, plugin: DeclaredPlugin)
pub fn declare_unchecked(&self, plugin: DeclaredPlugin)
Insert / replace without dependency validation. Used by the reactivation path (records from persistence are trusted).
Sourcepub fn get(&self, qname: &str) -> Option<DeclaredPlugin>
pub fn get(&self, qname: &str) -> Option<DeclaredPlugin>
Look up a declared plugin by qname.
Sourcepub fn drop_declared(&self, qname: &str) -> Result<bool, CustomError>
pub fn drop_declared(&self, qname: &str) -> Result<bool, CustomError>
Drop a declared plugin.
Returns true if the plugin existed.
§Errors
Returns CustomError::DependencyMissing if the plugin is a
dependency of another declared plugin (cascade mode lives at
Self::drop_cascade).
Sourcepub fn drop_cascade(&self, qname: &str) -> Vec<String>
pub fn drop_cascade(&self, qname: &str) -> Vec<String>
Drop a declared plugin together with every dependent.
Returns the qnames removed in topological (leaves-first) order.
Sourcepub fn replace(&self, plugin: DeclaredPlugin)
pub fn replace(&self, plugin: DeclaredPlugin)
Replace an existing record (no validation). Used for shadow-flag updates.
Sourcepub fn list(&self) -> Vec<DeclaredPlugin>
pub fn list(&self) -> Vec<DeclaredPlugin>
List every declared plugin.
Trait Implementations§
Source§impl Debug for DeclaredPluginStore
impl Debug for DeclaredPluginStore
Source§impl Default for DeclaredPluginStore
impl Default for DeclaredPluginStore
Source§fn default() -> DeclaredPluginStore
fn default() -> DeclaredPluginStore
Auto Trait Implementations§
impl !Freeze for DeclaredPluginStore
impl RefUnwindSafe for DeclaredPluginStore
impl Send for DeclaredPluginStore
impl Sync for DeclaredPluginStore
impl Unpin for DeclaredPluginStore
impl UnsafeUnpin for DeclaredPluginStore
impl UnwindSafe for DeclaredPluginStore
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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