Skip to main content

library

Macro library 

Source
macro_rules! library {
    ($($year:ident $description:literal $($day:ident)*),*) => { ... };
}
Expand description

Declares a public module for each year documented with its description and containing a sub-module for each day.

Two interesting things:

  • Module declaration is possible via macro.
  • Rust allows the day sub-module declarations directly without needing an intermediate mod.rs in each year folder.