pub fn with_event_handlers(
        mut self,
        event_handlers: EventHandlerBag<RequestCtx>,
    ) -> EngineBuilder<RequestCtx> {
        self.event_handlers = event_handlers;
        self
    }
/// Adds event handlers to the engine
///
/// # Examples
///
/// ```rust
/// # use warpgrapher::{Configuration, DatabasePool, Engine};
/// # use warpgrapher::engine::database::no_database::NoDatabasePool;
/// # use warpgrapher::engine::events::EventHandlerBag;
///
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
/// let event_handlers = EventHandlerBag::<()>::new();
///
/// let config = Configuration::default();
///
/// let mut engine = Engine::<()>::new(config, NoDatabasePool {})
///     .with_event_handlers(event_handlers)
///     .build()?;
/// # Ok(())
/// # }
/// ```
Adds event handlers to the engine
Adds event handlers to the engine
pub fn with_event_handlers(
        mut self,
        event_handlers: EventHandlerBag<RequestCtx>,
    ) -> EngineBuilder<RequestCtx> {
        self.event_handlers = event_handlers;
        self
    }
pub fn with_event_handlers ( mut self , event_handlers : EventHandlerBag < RequestCtx > , ) -> EngineBuilder < RequestCtx > { self . event_handlers = event_handlers ; self }
Adds event handlers to the engine
Adds event handlers to the engine
mut self
event_handlers
EventHandlerBag<RequestCtx>
mut self
event_handlers
EventHandlerBag<RequestCtx>
examples
None
use warpgrapher::{configuration, databasepool, engine};
None
use warpgrapher::engine::database::no_database::nodatabasepool;
None
use warpgrapher::engine::events::eventhandlerbag;
None
fn main() -> result<(), box<dyn std::error::error>> {
let event_handlers = EventHandlerBag::<()>::new().

let config = Configuration::default().

let mut engine = Engine::<()>::new(config, NoDatabasePool {})
.with_event_handlers(event_handlers)
.build()?.
let event_handlers = EventHandlerBag :: < () > :: new () . let config = Configuration :: default () . let mut engine = Engine :: < () > :: new ( config NoDatabasePool {} ) . with_event_handlers ( event_handlers ) . build () ? .
ok(())
None
}
None