INNER CODE UNIT · Rust

cmd

str4d/rage · rage/build.rs:106

    fn cmd(self, cmd: &'static str) -> Self {
        self.cmd_out(cmd, vec![])
    }

    fn cmd_out(mut self, cmd: &'static str, output: Vec<String>) -> Self {
        self.commands.push(ExampleCommand { cmd, output });
        self
    }
}

struct Examples<const N: usize>([Example; N]);

impl<const N: usize> Examples<N> {
    fn render(self, w: &mut impl io::Write) -> io::Result<()> {
        let mut roff = Roff::default();
        roff.control("SH", [fl!("man-examples-heading").as_str()]);
        for example in self.0 {
            roff.control("TP", []);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…