[−][src]Macro jeep_train_macro::server
server!() { /* proc-macro */ }
Used to define function that acts as a server's logic. Example
server!{ fn server; plugin CHECK_AUTH; router USER::ROUTER; router ARTICLE::ROUTER; plugin DEFAULT_RESPONSE; }
Let's break down the example
fn server;
fn
keyword must come at the top level and it cannot be used twice or more.
Ident given with the const keyword become the name of the router as it expands into fn server(conn: Conn) { /* expression */ }
plugin {ident};
plugin
keyword is used to insert new plugin
router {ident};
router
keyword is used to insert new router