| 61 | pub type DynPlugin = dyn Plugin + Send + Sync + 'static; |
| 62 | |
| 63 | pub trait Plugin { |
| 64 | fn class_names(&self) -> Option<&'static [&'static str]>; |
| 65 | |
| 66 | fn function_name_prefix(&self) -> Option<&'static str>; |
| 67 | |
| 68 | fn parent_classes(&self) -> Option<Vec<Option<&'static ClassEntry>>> { |
| 69 | None |
| 70 | } |
| 71 | |
| 72 | fn hook( |
| 73 | &self, class_name: Option<&str>, function_name: &str, |
| 74 | ) -> Option<(Box<BeforeExecuteHook>, Box<AfterExecuteHook>)>; |
| 75 | } |
| 76 | |
| 77 | #[allow(static_mut_refs)] // TODO: Swith to use thread_local |
| 78 | pub fn select_plugin_hook( |
no outgoing calls
no test coverage detected