Struct event_engine::App
source · [−]pub struct App {
pub plugins: Vec<Arc<Box<dyn Plugin>>>,
pub external_plugins: Vec<Arc<Box<dyn ExternalPlugin>>>,
pub app_config: AppConfig,
pub context: Context,
}Fields
plugins: Vec<Arc<Box<dyn Plugin>>>external_plugins: Vec<Arc<Box<dyn ExternalPlugin>>>app_config: AppConfigcontext: ContextImplementations
sourceimpl App
impl App
pub fn new(publish_port: i32, subscribe_port: i32) -> Self
sourcepub fn register_plugin(self, plugin: Arc<Box<dyn Plugin>>) -> Self
pub fn register_plugin(self, plugin: Arc<Box<dyn Plugin>>) -> Self
Add a new plugin to the app
sourcepub fn register_external_plugin(
self,
plugin: Arc<Box<dyn ExternalPlugin>>
) -> Self
pub fn register_external_plugin(
self,
plugin: Arc<Box<dyn ExternalPlugin>>
) -> Self
Add a new external plugin to the app
pub fn run(self) -> Result<(), EngineError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl !UnwindSafe for App
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more