Skip to main content

reserved

Function reserved 

Source
pub fn reserved() -> Vec<Reserved>
Expand description

The mounts this repository reserves.

A path is a name, and this repository has already paid once for a name meaning two things: the Swagger UI held /docs because the word was free, and the day documentation arrived the obvious path was occupied. These pairs are that decision written down where something reads it — the validator refuses a topology that breaks one, the generated topology publishes them, and the documentation renders what is published rather than restating it.

Each path is the same constant its surface is declared with, so a mount that moves moves here and the reservation follows it.

use majordomus_cli::web::discover::reserved;
let docs = reserved().into_iter().find(|r| r.role == "documentation").unwrap();
assert_eq!(docs.path, "/docs");
assert_eq!(docs.owner, "docs");
let swagger = reserved().into_iter().find(|r| r.role == "swagger").unwrap();
assert_eq!(swagger.path, "/swagger");
let rustdoc = reserved().into_iter().find(|r| r.owner == "rustdoc").unwrap();
assert_eq!(rustdoc.path, "/rustdoc");