pub struct Skeleton {
pub manifests: Vec<Manifest>,
pub config_file: Option<String>,
pub lock_file: Option<String>,
pub rust_toolchain_file: Option<(RustToolchainFile, String)>,
}
Fields§
§manifests: Vec<Manifest>
§config_file: Option<String>
§lock_file: Option<String>
§rust_toolchain_file: Option<(RustToolchainFile, String)>
Implementations§
source§impl Skeleton
impl Skeleton
sourcepub fn derive<P: AsRef<Path>>(
base_path: P,
member: Option<String>
) -> Result<Self, Error>
pub fn derive<P: AsRef<Path>>( base_path: P, member: Option<String> ) -> Result<Self, Error>
Find all Cargo.toml files in base_path
by traversing sub-directories recursively.
sourcepub fn build_minimum_project(
&self,
base_path: &Path,
no_std: bool
) -> Result<(), Error>
pub fn build_minimum_project( &self, base_path: &Path, no_std: bool ) -> Result<(), Error>
Given the manifests in the current skeleton, create the minimum set of files required to
have a valid Rust project (i.e. write all manifests to disk and create dummy lib.rs
,
main.rs
and build.rs
files where needed).
This function should be called on an empty canvas - i.e. an empty directory apart from the recipe file used to restore the skeleton.
sourcepub fn remove_compiled_dummies<P: AsRef<Path>>(
&self,
base_path: P,
profile: OptimisationProfile,
target: Option<Vec<String>>,
target_dir: Option<PathBuf>
) -> Result<(), Error>
pub fn remove_compiled_dummies<P: AsRef<Path>>( &self, base_path: P, profile: OptimisationProfile, target: Option<Vec<String>>, target_dir: Option<PathBuf> ) -> Result<(), Error>
Scan the target directory and remove all compilation artifacts for libraries and build
scripts from the current workspace.
Given the usage of dummy lib.rs
and build.rs
files, keeping them around leads to funny
compilation errors.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Skeleton
impl<'de> Deserialize<'de> for Skeleton
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Skeleton
impl PartialEq for Skeleton
impl Eq for Skeleton
impl StructuralPartialEq for Skeleton
Auto Trait Implementations§
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnwindSafe for Skeleton
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.