pub struct ContentGraphBuilder { /* private fields */ }Expand description
Incrementally builds a ContentGraph.
Call add_file as content is scanned, then build() to obtain the
immutable graph.
Implementations§
Source§impl ContentGraphBuilder
impl ContentGraphBuilder
Sourcepub fn add_file(&mut self, relative_path: &str, slug: &str)
pub fn add_file(&mut self, relative_path: &str, slug: &str)
Register a content file.
relative_path is the path relative to the source root (e.g.
"posts/hello.md"). slug is the URL slug for this file.
Sourcepub fn build(self) -> ContentGraph
pub fn build(self) -> ContentGraph
Consume the builder and produce an immutable ContentGraph.
Trait Implementations§
Source§impl Debug for ContentGraphBuilder
impl Debug for ContentGraphBuilder
Source§impl Default for ContentGraphBuilder
impl Default for ContentGraphBuilder
Source§fn default() -> ContentGraphBuilder
fn default() -> ContentGraphBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContentGraphBuilder
impl RefUnwindSafe for ContentGraphBuilder
impl Send for ContentGraphBuilder
impl Sync for ContentGraphBuilder
impl Unpin for ContentGraphBuilder
impl UnsafeUnpin for ContentGraphBuilder
impl UnwindSafe for ContentGraphBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more