pub struct Stuart {
pub dir: PathBuf,
pub input: Option<Node>,
pub output: Option<Node>,
pub config: Config,
pub base: Option<StackFrame>,
pub plugins: Option<Box<dyn Manager>>,
}
Expand description
The project builder.
Fields§
§dir: PathBuf
The input directory.
input: Option<Node>
The input virtual filesystem tree.
output: Option<Node>
The output virtual filesystem tree.
config: Config
The configuration of the project.
base: Option<StackFrame>
The base stack frame for each node.
plugins: Option<Box<dyn Manager>>
The plugins to be used by Stuart.
Implementations§
Source§impl Stuart
impl Stuart
Sourcepub fn new_from_node(node: Node) -> Self
pub fn new_from_node(node: Node) -> Self
Creates a new builder from a virtual filesystem tree. (for tests)
Sourcepub fn with_config(self, config: Config) -> Self
pub fn with_config(self, config: Config) -> Self
Sets the configuration to use.
Sourcepub fn with_plugins<T>(self, plugins: T) -> Selfwhere
T: Manager + 'static,
pub fn with_plugins<T>(self, plugins: T) -> Selfwhere
T: Manager + 'static,
Sets the plugin manager to use.
Sourcepub fn build(&mut self, stuart_env: String) -> Result<(), Error>
pub fn build(&mut self, stuart_env: String) -> Result<(), Error>
Attempts to build the project.
Sourcepub fn merge_output(&mut self, node: Node) -> Result<(), Error>
pub fn merge_output(&mut self, node: Node) -> Result<(), Error>
Merges an output node with the built result.
This is used for merging static content with the build output.
Auto Trait Implementations§
impl Freeze for Stuart
impl !RefUnwindSafe for Stuart
impl !Send for Stuart
impl !Sync for Stuart
impl Unpin for Stuart
impl !UnwindSafe for Stuart
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