pub struct PluginRegistry { /* private fields */ }Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new() -> Self
pub fn register(&mut self, plugin: Box<dyn MirPlugin>)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn plugin_names(&self) -> Vec<&str>
pub fn hooks(&self) -> HookFlags
Sourcepub fn stub_files(&self) -> Vec<PathBuf>
pub fn stub_files(&self) -> Vec<PathBuf>
All stub files contributed by registered plugins.
Sourcepub fn has_function_provider(&self, function_id: &str) -> bool
pub fn has_function_provider(&self, function_id: &str) -> bool
Whether any plugin provides a return type for function_id
(pre-normalized). Cheap gate before building the provider event.
pub fn has_method_provider(&self, fqcn_normalized: &str) -> bool
Sourcepub fn has_any_function_provider(&self) -> bool
pub fn has_any_function_provider(&self) -> bool
Whether any registered plugin declares any return-type provider — used to skip id normalization entirely on the hot call path.
pub fn has_any_method_provider(&self) -> bool
Sourcepub fn function_return_type(
&self,
event: &FunctionReturnTypeProviderEvent<'_>,
) -> Option<ProvidedType>
pub fn function_return_type( &self, event: &FunctionReturnTypeProviderEvent<'_>, ) -> Option<ProvidedType>
First-plugin-wins return type for a function call, in registration
order (matching Psalm, where the last registered provider for an id
replaces earlier ones — we instead chain until one returns Some).
pub fn method_return_type( &self, fqcn_normalized: &str, event: &MethodReturnTypeProviderEvent<'_>, ) -> Option<ProvidedType>
pub fn has_any_class_property_provider(&self) -> bool
Sourcepub fn has_class_property_marker(&self, marker_normalized: &str) -> bool
pub fn has_class_property_marker(&self, marker_normalized: &str) -> bool
Whether any plugin registered marker_normalized (pre-normalized) as a
class-property-provider marker. The analyzer calls this for the
receiver’s own class and each ancestor.
pub fn class_property( &self, marker_normalized: &str, event: &ClassPropertyProviderEvent<'_>, ) -> Option<ProvidedType>
pub fn after_expression_analysis( &self, event: &mut AfterExpressionAnalysisEvent<'_>, )
pub fn after_statement_analysis( &self, event: &mut AfterStatementAnalysisEvent<'_>, )
pub fn after_function_call_analysis( &self, event: &mut AfterFunctionCallAnalysisEvent<'_>, )
pub fn after_method_call_analysis( &self, event: &mut AfterMethodCallAnalysisEvent<'_>, )
Sourcepub fn before_add_issue(&self, issue: &Issue) -> bool
pub fn before_add_issue(&self, issue: &Issue) -> bool
false when some plugin vetoed the issue. First non-None wins.
pub fn after_codebase_populated( &self, event: &mut AfterCodebasePopulatedEvent<'_>, )
Trait Implementations§
Source§impl Default for PluginRegistry
impl Default for PluginRegistry
Source§fn default() -> PluginRegistry
fn default() -> PluginRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PluginRegistry
impl !UnwindSafe for PluginRegistry
impl Freeze for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin for PluginRegistry
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