pub struct Module {
pub name: String,
pub root: PathBuf,
pub config: Option<Sourced<Config>>,
pub src_path: PathBuf,
}Expand description
Either the main project or a plugin
Fields§
§name: String§root: PathBuf§config: Option<Sourced<Config>>§src_path: PathBufImplementations§
Source§impl Module
impl Module
Sourcepub fn load<S: Into<String>>(name: S, root: &Path) -> DdResult<Self>
pub fn load<S: Into<String>>(name: S, root: &Path) -> DdResult<Self>
Load the module from the given root directory, reading its config file (which is optional when the module is a plugin (i.e. name is not empty), but required when it’s the main project).
pub fn is_main(&self) -> bool
pub fn list_js(&self, entries: &mut Vec<StaticEntry>) -> DdResult<()>
pub fn list_css(&self, entries: &mut Vec<StaticEntry>) -> DdResult<()>
pub fn add_watch_targets(&self, targets: &mut Vec<WatchTarget>)
pub fn copy_all_statics_into(&self, build_root: &Path) -> DdResult<()>
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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