(&self)
| 212 | } |
| 213 | |
| 214 | pub async fn list(&self) -> Vec<(HookEvent, String, bool)> { |
| 215 | let hooks = self.hooks.read().await; |
| 216 | let mut result = Vec::new(); |
| 217 | |
| 218 | for (event, hook_list) in hooks.iter() { |
| 219 | for hook in hook_list { |
| 220 | result.push((event.clone(), hook.name.clone(), hook.enabled)); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | result |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | impl Default for PluginSystem { |