From 191f594e78d2a0f27b2c46c775e8418890f61dff Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Tue, 4 Aug 2015 20:51:01 +0200 Subject: [PATCH] Added function to MDBook to swap renderer #10 --- src/book/mdbook.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/book/mdbook.rs b/src/book/mdbook.rs index bb624b9c..9c0ba7b6 100644 --- a/src/book/mdbook.rs +++ b/src/book/mdbook.rs @@ -126,6 +126,11 @@ impl MDBook { self } + pub fn set_renderer(mut self, renderer: Box) -> Self { + self.renderer = renderer; + self + } + pub fn set_dest(mut self, dest: &Path) -> Self { self.config.set_dest(dest); self