controllers

Macro controllers 

Source
macro_rules! controllers {
    ($($controller:ty),* $(,)?) => { ... };
}
Expand description

Creates a vector of controllers allocated to Heap (via Box)

ยงExample

#[derive(Default)]
pub struct AppState {
  postgres: Pool<Postgres>
};

Service {
  name: "Example",
  state: AppState::default(),
  controllers: controllers![ExampleController, YetAnotherControler],
  ..Default::default() // port: None
}