pub struct Module {Show 13 fields
pub name: String,
pub version: String,
pub class: String,
pub dependencies: Vec<Dependency>,
pub metadata: HashMap<String, String>,
pub environment: HashMap<String, Environment>,
pub root: String,
pub pre_build: Option<Vec<String>>,
pub downloader: Downloader,
pub builder: Builder,
pub source_path: String,
pub build_path: String,
pub install_path: String,
}
Fields§
§name: String
Name of the module
version: String
Module version
class: String
Module class (flavours)
dependencies: Vec<Dependency>
Module dependencies
metadata: HashMap<String, String>
Module metadata
environment: HashMap<String, Environment>
Environment variables to set/change
root: String
Path root (${root}/${name}/${version})
pre_build: Option<Vec<String>>
A list of commands to run before building
downloader: Downloader
Downloader to download the source code
builder: Builder
Builder to build and install the source code
source_path: String
§build_path: String
§install_path: String
Implementations§
source§impl Module
impl Module
sourcepub fn parse(
&self,
flavour: &(&[Module], usize)
) -> (String, String, String, Vec<String>)
pub fn parse( &self, flavour: &(&[Module], usize) ) -> (String, String, String, Vec<String>)
Parse a flavour into:
- flavour_str: a postfix to a path pointing to a flavour directory
- build_path: updated build path
- install_path: updated install path
- modules: module names necessary for installation
pub fn identifier(&self) -> String
sourcepub fn download(&self) -> Result<(), String>
pub fn download(&self) -> Result<(), String>
Download the source code for the module, based on its Downloader
.
§Errors
This will error if the download fails, with an error String
containing
either an error message or the output of the errored command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin 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